Skip to content

Commit 7b72eb3

Browse files
[material-ui][Unstable_TrapFocus] Fix getTabbable function return type (#42237)
Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
1 parent 0e035ea commit 7b72eb3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/mui-material/src/Unstable_TrapFocus/FocusTrap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ function FocusTrap(props: FocusTrapProps): React.JSX.Element {
270270
return;
271271
}
272272

273-
let tabbable: ReadonlyArray<string> | HTMLElement[] = [];
273+
let tabbable: ReadonlyArray<HTMLElement> = [];
274274
if (
275275
doc.activeElement === sentinelStart.current ||
276276
doc.activeElement === sentinelEnd.current

packages/mui-material/src/Unstable_TrapFocus/FocusTrap.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface FocusTrapProps {
1010
* For instance, you can provide the "tabbable" npm dependency.
1111
* @param {HTMLElement} root
1212
*/
13-
getTabbable?: (root: HTMLElement) => ReadonlyArray<string>;
13+
getTabbable?: (root: HTMLElement) => ReadonlyArray<HTMLElement>;
1414
/**
1515
* This prop extends the `open` prop.
1616
* It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.

0 commit comments

Comments
 (0)