13
13
import { AriaGridListProps } from '@react-types/list' ;
14
14
import { DOMAttributes , KeyboardDelegate } from '@react-types/shared' ;
15
15
import { filterDOMProps , mergeProps , useId } from '@react-aria/utils' ;
16
- import { Key , RefObject } from 'react' ;
17
16
import { listMap } from './utils' ;
18
17
import { ListState } from '@react-stately/list' ;
18
+ import { RefObject } from 'react' ;
19
19
import { useGridSelectionAnnouncement , useHighlightSelectionDescription } from '@react-aria/grid' ;
20
20
import { useSelectableList } from '@react-aria/selection' ;
21
21
@@ -26,12 +26,7 @@ export interface AriaGridListOptions<T> extends Omit<AriaGridListProps<T>, 'chil
26
26
* An optional keyboard delegate implementation for type to select,
27
27
* to override the default.
28
28
*/
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
35
30
}
36
31
37
32
export interface GridListAria {
@@ -50,7 +45,6 @@ export function useGridList<T>(props: AriaGridListOptions<T>, state: ListState<T
50
45
let {
51
46
isVirtualized,
52
47
keyboardDelegate,
53
- getRowText,
54
48
onAction
55
49
} = props ;
56
50
@@ -93,7 +87,7 @@ export function useGridList<T>(props: AriaGridListOptions<T>, state: ListState<T
93
87
gridProps [ 'aria-colcount' ] = 1 ;
94
88
}
95
89
96
- useGridSelectionAnnouncement ( { getRowText } , state ) ;
90
+ useGridSelectionAnnouncement ( { } , state ) ;
97
91
98
92
return {
99
93
gridProps
0 commit comments