const [park, parks] = useState<Park[]>([]);
...
useState(()=>{
(async () => {... // call Park Data as Array})()
},[]);
...
const columns = [
{
title: 'column1',
key: 'column1',
filters: true,
defaultFilteredValue: parks?.length ? ['...'] : [],
...
}
];
I wrote my column like above, and I want my defaultFilteredValue changes when rerender happens.
When I console the columns like useEffect(()=>{console.log(column)},[parks.length]), column's defaultFilteredValue changes properly, but Table doesn't show filterd value.
What should I do to solve this problem?