Skip to content

Commit

Permalink
[material-ui][Unstable_TrapFocus] Fix getTabbable function return t…
Browse files Browse the repository at this point in the history
…ype (#42237)

Co-authored-by: ZeeshanTamboli <[email protected]>
  • Loading branch information
KalmarLorand and ZeeshanTamboli authored Aug 23, 2024
1 parent 0e035ea commit 7b72eb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mui-material/src/Unstable_TrapFocus/FocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function FocusTrap(props: FocusTrapProps): React.JSX.Element {
return;
}

let tabbable: ReadonlyArray<string> | HTMLElement[] = [];
let tabbable: ReadonlyArray<HTMLElement> = [];
if (
doc.activeElement === sentinelStart.current ||
doc.activeElement === sentinelEnd.current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface FocusTrapProps {
* For instance, you can provide the "tabbable" npm dependency.
* @param {HTMLElement} root
*/
getTabbable?: (root: HTMLElement) => ReadonlyArray<string>;
getTabbable?: (root: HTMLElement) => ReadonlyArray<HTMLElement>;
/**
* This prop extends the `open` prop.
* It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
Expand Down

0 comments on commit 7b72eb3

Please sign in to comment.