Skip to content

Commit b5336b4

Browse files
authored
Broaden allowed triggerRef elements for table column resizer (#4026)
Div element is too restrictivesince a button could be used instead
1 parent 7919759 commit b5336b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@react-aria/table/src/useTableColumnResize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import {ChangeEvent, Key, RefObject, useCallback, useRef} from 'react';
14-
import {DOMAttributes} from '@react-types/shared';
14+
import {DOMAttributes, FocusableElement} from '@react-types/shared';
1515
import {focusSafely} from '@react-aria/focus';
1616
import {focusWithoutScrolling, mergeProps, useId} from '@react-aria/utils';
1717
import {getColumnHeaderId} from './utils';
@@ -38,7 +38,7 @@ export interface AriaTableColumnResizeProps<T> {
3838
* Ref to the trigger if resizing was started from a column header menu. If it's provided,
3939
* focus will be returned there when resizing is done.
4040
* */
41-
triggerRef?: RefObject<HTMLDivElement>,
41+
triggerRef?: RefObject<FocusableElement>,
4242
/** If resizing is disabled. */
4343
isDisabled?: boolean,
4444
/** Called when resizing starts. */

0 commit comments

Comments
 (0)