Setting combobox/select value
does not always select matching item/option
#9612
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Field Apps
Issues logged by ArcGIS Field Apps team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
calcite-components
Issues specific to the @esri/calcite-components package.
estimate - 5
A few days of work, definitely requires updates to tests.
impact - p3 - not time sensitive
User set priority impact status of p3 - not time sensitive
p - medium
Issue is non core or affecting less that 60% of people using the library
Milestone
Check existing issues
Actual Behavior
Given a
<calcite-combobox>
or<calcite-select>
element containing<calcite-combobox-item>
or<calcite-option>
children with non-stringvalue
props, setting the parent'svalue
prop does not select the matching child.Expected Behavior
Possible options:
value
type matches the child'svalue
type.combobox-item
andoption
components such that their respectivevalue
props are typed asstring
instead ofany
.Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/OJYzqvz
Reproduction Steps
Reproduction Version
2.9.0
Relevant Info
If the typing allows for it, setting a non-numeric value is an easy pit to fall into when using these components inside a templating language like
JSX
or Ember. If theany
typing is preserved, it'll be important to verify that comparisons between falsy values don't match:false
,0
,''
, etc…Regression?
No response
Priority impact
impact - p3 - not time sensitive
Impact
The issue is easily worked around, but can be hard to debug since the typing is ostensibly correct.
Calcite package
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: