Modal: Support initialFocus
option for focusing a specific element when opened.
#8073
Closed
2 of 5 tasks
Labels
0 - new
New issues that need assignment.
ArcGIS Maps SDK for JavaScript
Issues logged by ArcGIS SDK for JavaScript team members.
calcite-components
Issues specific to the @esri/calcite-components package.
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.
Check existing issues
Description
In rare cases, it may be needed to focus a specific element when a focus trapped component is opened. For example, focusing a
username
input within a modal rather than the close button by default. This is a convenience to allow users to quickly type in their username/password and should not be done for every scenario.In order to support this, we should introduce/expose the
initialFocus
focus-trap option to allow a user to set a specific element or query string to focus when being opened.Acceptance Criteria
expose initialFocus option as a property on modal
Relevant Info
No response
Which Component
modal
Example Use Case
Priority impact
p2 - want for current milestone
Calcite package
Esri team
ArcGIS Maps SDK for JavaScript
The text was updated successfully, but these errors were encountered: