You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom getFacetedUniqueValues does not update on rerenders #6081
I am trying to implement custom server-side column faceting, as suggested in the docs.
So I am getting unique values from the server and expect to plug them into the table by updating getFacetedUniqueValues function, like this:
const[manualFilterValues,setManualFilterValues]=useState(newMap<string,number>([["placeholder",1]]));// Emulating getting filter values from serveruseEffect(()=>setManualFilterValues(newMap<string,number>([['value1',1],['value2',1],])),[]);consttable=useReactTable({
...
// Plugging current server filter values into getFacetedUniqueValuesgetFacetedUniqueValues: (_table,_columnId)=>()=>{returnmanualFilterValues;},});
However, getFacetedUniqueValues seems to be memorized and calling column.getFacetedUniqueValues() only ever returns data from the first render ('placeholder' in this example).
Example from the docs also causes error upon render, as instead of this:
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms & Code of Conduct
I agree to follow this project's Code of Conduct
I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Activity