I need to set the initial filter value inside GridColumnMenuFilter.
The problem: initial value applies to filter under title but not apply to filter inside GridColumnMenuFilter.
Code example:
const initialFilter: CompositeFilterDescriptor = {
logic: "and",
filters: [
{
field: "isAdmin",
operator: "eq",
value: true,
},
],
};
const GridColumnMenu = (props: GridColumnMenuProps): JSX.Element => {
return (
<div>
<GridColumnMenuFilter {...props} expanded={true} hideSecondFilter />
</div>
);
};
const columnProps = (
field: string
) => {
return {
field: field,
columnMenu: GridColumnMenu
};
};
<Grid
data={tableData.data}
filterable={true}
filter={initialFilter}
>
<GridColumn
title={"Is Admin>"}
{...columnProps("isAdmin")} />
...
</Grid>
Thanks for any help.