Skip to content

Add calciteBeforeItemSelect event for dropdown items #11634

@jmhauck

Description

@jmhauck

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - newNew issues that need assignment.ArcGIS SolutionsIssues logged by ArcGIS Solutions team members.enhancementIssues tied to a new feature or request.impact - p2 - want for an upcoming milestoneUser set priority impact status of p2 - want for an upcoming milestoneneeds triagePlanning workflow - pending design/dev review.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions