calcite-design-system icon indicating copy to clipboard operation
calcite-design-system copied to clipboard

No longer filter components by their item's value property

Open driskull opened this issue 8 months ago • 0 comments

Check existing issues

Description

  • Ideally, components should only be filtering by content (a label, description, etc). The things the end user actually sees and is displayed by the component
  • value is never displayed to the end user which means they may wonder why an item is matching.
  • value is more commonly used as a unique identifier that should not be searchable
  • metadata is a more appropriate property to use for additional additional search fields or information that can be used for filtering/searching.
  • By default, it would be nice if users didn't have to configure matchFields on a list to get the best setup.

Acceptance Criteria

  • components that have filtering on them do not filter using value by default.

Relevant Info

https://github.com/Esri/calcite-design-system/pull/9569

Which Component

  • list
  • combobox

Example Use Case

in cases like this:

<calcite-combobox>
  <calcite-combobox-item value="8fd5d99a-100d-4800-8e88-f29a5477c559" text-label="Natural Resources"></calcite-combobox-item>
  <calcite-combobox-item value="3e8f074e-2d88-48bf-b669-22047777a603 " text-label="Agriculture"></calcite-combobox-item>
</calcite-combobox>

It means if someone enters the character "f" or "d" its going to match to both those items for no good reason.

Priority impact

impact - p2 - want for an upcoming milestone

Calcite package

  • [X] @esri/calcite-components
  • [ ] @esri/calcite-components-angular
  • [ ] @esri/calcite-components-react
  • [ ] @esri/calcite-design-tokens
  • [ ] @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Maps SDK for JavaScript

driskull avatar Jun 17 '24 18:06 driskull