Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add calciteBeforeItemSelect event for dropdown items #11634

Open
2 of 6 tasks
jmhauck opened this issue Feb 26, 2025 · 0 comments
Open
2 of 6 tasks

Add calciteBeforeItemSelect event for dropdown items #11634

jmhauck opened this issue Feb 26, 2025 · 0 comments
Labels
0 - new New issues that need assignment. ArcGIS Solutions Issues logged by ArcGIS Solutions team members. enhancement Issues tied to a new feature or request. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs triage Planning workflow - pending design/dev review.

Comments

@jmhauck
Copy link

jmhauck commented Feb 26, 2025

Check existing issues

Description

Please emit a cancelable event calciteBeforeItemSelect for dropdown items.

Acceptance Criteria

dropdown item selection could be prevented for specific scenarios

Relevant Info

The workflow we are after is that we have each of the layers from the map in a dropdown. If the user is currently editing a feature from the layer that is selected in the dropdown and they try to select a different layer we show a prompt to keep or discard the edits. If they choose to continue editing we would like to retain the item that was initially selected rather than the new layer they started to switch to.

Which Component

dropdown item

Example Use Case

https://codepen.io/jmhauck/pen/raNMrvG?editors=1000

Priority impact

impact - p2 - want for an upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Solutions

@jmhauck jmhauck added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Feb 26, 2025
@github-actions github-actions bot added ArcGIS Solutions Issues logged by ArcGIS Solutions team members. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Solutions Issues logged by ArcGIS Solutions team members. enhancement Issues tied to a new feature or request. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

1 participant