Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
285 stars 76 forks source link

Calcite Combobox "single-persist" selection mode does not prevent deselection #10163

Open GealSarrett opened 1 month ago

GealSarrett commented 1 month ago

Check existing issues

Actual Behavior

Setting the selection mode to "single-persist" behaves identically to "single" mode. The user is allowed to use the "x" chip to remove their selection.

Expected Behavior

The user, per the documentation on the single-persist selection mode, should not be able to clear the selected item.

Reproduction Sample

https://developers.arcgis.com/calcite-design-system/components/combobox/

Reproduction Steps

  1. Open the sample page
  2. Change the selection mode to "single-persist"
  3. Select an item in the combobox
  4. Click on the gray "x" chip button in the combo-box

Reproduction Version

2.11.1

Relevant Info

Windows 11, Edge, Firefox and Chrome. No console errors/warnings.

Regression?

Not sure.

Priority impact

impact - p3 - not time sensitive

Impact

Requires adding additional scripting logic alongside the component to account for the possibility of user deselection.

Calcite package

Esri team

N/A

macandcheese commented 1 month ago

As a workaround you can use clear-disabled property in combination with selection-mode="single-persist".

cc @DitwanP re: potential documentation update for the selection-mode prop?

geospatialem commented 2 weeks ago

Spike to determine functionality of selection-mode="single-persist" and next steps. For the spike effort refer to some discussion in https://github.com/Esri/calcite-design-system/issues/4738 for additional background/history.