[material-ui][FocusTrap] getTabbable function has a return type of string[] instead of HTMLElement[] #42231
Labels
bug 🐛
Something doesn't work
component: FocusTrap
The React component.
good first issue
Great for first contributions. Enable to learn the contribution process.
package: material-ui
Specific to @mui/material
typescript
Steps to reproduce
Link to live example: (required)
Steps:
Current behavior
Based on the description of the
getTabbable
prop of theFocusTrap
component:Returns an array of ordered tabbable nodes (i.e. in tab order) within the root. For instance, you can provide the "tabbable" npm dependency.
However, the type definition of this function expects it to return a
ReadonlyArray<string>
.When returning a HTML Element array, it throws:
Expected behavior
The
getTabbable
prop should accept a function returning an array of HTMLElements.Search keywords: getTabbable, FocusTrap
The text was updated successfully, but these errors were encountered: