Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "make allowCondition a optional parameter for findAllFocusable function",
"packageName": "@fluentui/react-tabster",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface UseFocusableGroupOptions {

// @public
export const useFocusFinders: () => {
findAllFocusable: (container: HTMLElement, acceptCondition: (el: HTMLElement) => boolean) => HTMLElement[];
findAllFocusable: (container: HTMLElement, acceptCondition?: ((el: HTMLElement) => boolean) | undefined) => HTMLElement[];
findFirstFocusable: (container: HTMLElement) => HTMLElement | null | undefined;
findLastFocusable: (container: HTMLElement) => HTMLElement | null | undefined;
findNextFocusable: (currentElement: HTMLElement, options?: Pick<Types.FindNextProps, 'container'>) => HTMLElement | null | undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useFocusFinders = () => {

// Narrow props for now and let need dictate additional props in the future
const findAllFocusable = React.useCallback(
(container: HTMLElement, acceptCondition: (el: HTMLElement) => boolean) =>
(container: HTMLElement, acceptCondition?: (el: HTMLElement) => boolean) =>
tabster?.focusable.findAll({ container, acceptCondition }) || [],
[tabster],
);
Expand Down