Skip to content

Commit c1ee506

Browse files
committed
fix(types): make useFocusManger options optional
1 parent 3703508 commit c1ee506

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/useFocusManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ export interface FocusManagerOptions {
88
* A callback fired when focus shifts. returning `false` will prevent
99
* handling the focus event
1010
*/
11-
willHandle(focused: boolean, event: React.FocusEvent): boolean | void
11+
willHandle?(focused: boolean, event: React.FocusEvent): boolean | void
1212

1313
/**
1414
* A callback fired after focus is handled but before onChange is called
1515
*/
16-
didHandle(focused: boolean, event: React.FocusEvent): void
16+
didHandle?(focused: boolean, event: React.FocusEvent): void
1717

1818
/**
1919
* A callback fired after focus has changed
2020
*/
21-
onChange(focused: boolean, event: React.FocusEvent): void
21+
onChange?(focused: boolean, event: React.FocusEvent): void
2222

2323
/**
2424
* When true, the event handlers will not report focus changes

0 commit comments

Comments
 (0)