I'm trying to implement the new calcite components dropdown menu and can't get it to select any of the value options for the field-select.
According to the doc, we need to listen to the 'calciteDropdownSelect' event on the calcite-dropdown element. In your code you retrieve the selected item information later on, so you can use the 'selectedItems' property to discover this information. Here's a slightly updated version of your CodePen that shows these concepts: https://codepen.io/john-grayson/pen/JjNappM
For anyone coming across this and seeing 'selectedItems' forever an empty array, I found this to be the case. The solution I found was to put my calcite-dropdown-items in a calcite-dropdown-group. Nothing else needed beyond that. This was the only way I found to know when/which item is selected in a calcite dropdown.
(@JohnGrayson howdy, been awhile!)
Thanks John! It still wasn't rendering but instead of "selected" for the default choice it is now "active". All works then.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.