Skip to content

Commit 4fdd20e

Browse files
authored
removing getRowText prop from useGridList (#3431)
1 parent af06f65 commit 4fdd20e

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/@react-aria/gridlist/src/useGridList.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import {AriaGridListProps} from '@react-types/list';
1414
import {DOMAttributes, KeyboardDelegate} from '@react-types/shared';
1515
import {filterDOMProps, mergeProps, useId} from '@react-aria/utils';
16-
import {Key, RefObject} from 'react';
1716
import {listMap} from './utils';
1817
import {ListState} from '@react-stately/list';
18+
import {RefObject} from 'react';
1919
import {useGridSelectionAnnouncement, useHighlightSelectionDescription} from '@react-aria/grid';
2020
import {useSelectableList} from '@react-aria/selection';
2121

@@ -26,12 +26,7 @@ export interface AriaGridListOptions<T> extends Omit<AriaGridListProps<T>, 'chil
2626
* An optional keyboard delegate implementation for type to select,
2727
* to override the default.
2828
*/
29-
keyboardDelegate?: KeyboardDelegate,
30-
/**
31-
* A function that returns the text that should be announced by assistive technology when a row is added or removed from selection.
32-
* @default (key) => state.collection.getItem(key)?.textValue
33-
*/
34-
getRowText?: (key: Key) => string
29+
keyboardDelegate?: KeyboardDelegate
3530
}
3631

3732
export interface GridListAria {
@@ -50,7 +45,6 @@ export function useGridList<T>(props: AriaGridListOptions<T>, state: ListState<T
5045
let {
5146
isVirtualized,
5247
keyboardDelegate,
53-
getRowText,
5448
onAction
5549
} = props;
5650

@@ -93,7 +87,7 @@ export function useGridList<T>(props: AriaGridListOptions<T>, state: ListState<T
9387
gridProps['aria-colcount'] = 1;
9488
}
9589

96-
useGridSelectionAnnouncement({getRowText}, state);
90+
useGridSelectionAnnouncement({}, state);
9791

9892
return {
9993
gridProps

0 commit comments

Comments
 (0)