I've implemented a Kendo React Grid and Tooltip. I can filter the grid without issues, however the tooltip is not updating to match the filtered grid. The tooltip is showing the information for the item that was previously in the row before the grid was filtered.
I can see that moving the cursor over the grid cell clears the tootip from the source <td title>some data</td>
Lines 01 to 23 show how my grid is implemented and lines 31 to 38 show my Tooltip component.
How can I get the cell tootip to respond to the filtering?
01.
<Tooltip openDelay={100} position=
"bottom"
>
02.
<Grid
03.
data={process(
this
.state.gridData.map((item) => ({...item, selected: item[
"id"
] ==
this
.state.selectedID}) ),
this
.state.gridDataState)}
04.
{...
this
.state.gridDataState}
05.
onDataStateChange={
this
.handleGridDataStateChange}
06.
pageable={
true
}
07.
sortable={
true
}
08.
selectedField=
"selected"
>
09.
10.
<Column
11.
field=
"id"
12.
title=
"id"
13.
filter={
'text'
}
14.
cell={Tooltip}
15.
columnMenu={ColumnMenu} />
16.
<Column
17.
field=
"name"
18.
title=
"name"
19.
filter={
'text'
}
20.
cell={Tooltip}
21.
columnMenu={ColumnMenu} />
22.
</Grid>
23.
</Tooltip>
24.
25.
handleGridDataStateChange = (e) => {
26.
this
.setState({gridDataState: e.data})
27.
}
28.
29.
30.
31.
export const Tooltip = (props: GridCellProps) => {
32.
const {field} = props;
33.
return
(
34.
<td title={props.dataItem[field]}>
35.
{props.dataItem[field]}
36.
</td>
37.
);
38.
}