@@ -9,7 +9,7 @@ import iconGroup from '@ui5/webcomponents-icons/dist/group-2.js';
9
9
import iconSortAscending from '@ui5/webcomponents-icons/dist/sort-ascending.js' ;
10
10
import iconSortDescending from '@ui5/webcomponents-icons/dist/sort-descending.js' ;
11
11
import { enrichEventWithDetails , useI18nBundle } from '@ui5/webcomponents-react-base' ;
12
- import { useEffect , useMemo , useRef } from 'react' ;
12
+ import { useEffect , useId , useMemo , useRef } from 'react' ;
13
13
import { FlexBoxAlignItems } from '../../../../enums/FlexBoxAlignItems.js' ;
14
14
import { TextAlign } from '../../../../enums/TextAlign.js' ;
15
15
import {
@@ -31,20 +31,21 @@ import { Popover } from '../../../../webComponents/Popover/index.js';
31
31
import { Text } from '../../../../webComponents/Text/index.js' ;
32
32
import { FlexBox } from '../../../FlexBox/index.js' ;
33
33
import type { TableInstanceWithPopoverProps } from '../../types/index.js' ;
34
+ import { RenderColumnTypes } from '../../types/index.js' ;
34
35
35
36
export const ColumnHeaderModal = ( instance : TableInstanceWithPopoverProps ) => {
36
37
const { setOpen, openerRef } = instance . popoverProps ;
37
38
const { column, state, webComponentsReactProperties } = instance ;
38
39
const { isRtl, groupBy } = state ;
39
40
const { onGroup, onSort, classes : classNames } = webComponentsReactProperties ;
41
+ const uniqueId = useId ( ) ;
40
42
41
43
const showFilter = column . canFilter ;
42
44
const showGroup = column . canGroupBy ;
43
45
const showSort = column . canSort ;
44
46
45
47
const ref = useRef < PopoverDomRef > ( null ) ;
46
48
const listRef = useRef ( null ) ;
47
- const { Filter } = column ;
48
49
49
50
const i18nBundle = useI18nBundle ( '@ui5/webcomponents-react' ) ;
50
51
@@ -231,10 +232,14 @@ export const ColumnHeaderModal = (instance: TableInstanceWithPopoverProps) => {
231
232
style = { {
232
233
fontSize : filterStyles . fontSize
233
234
} }
235
+ id = { `${ uniqueId } -filter-text` }
234
236
>
235
237
{ filterText }
236
238
</ Text >
237
- < Filter column = { column } popoverRef = { ref } />
239
+ { column . render ( RenderColumnTypes . Filter , {
240
+ accessibleNameRef : `${ uniqueId } -filter-text` ,
241
+ popoverRef : ref
242
+ } ) }
238
243
</ FlexBox >
239
244
</ ListItemCustom >
240
245
) }
0 commit comments