Losing value of filters when data is refresh #790
Unanswered
LlopizJuan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I end writing my columns like this for avoid losing filtering values when data state is refresh
const [data, setData] = useState( [ ] )
/Scheduled every 5 minutes and seting new data/
I end with this problem : if I add to the useMemo dependency [data] the component DatePicker receive the new data when is update and i can use it to for what i want ,but with the cost of losing the values of the filters in each rendering that there is new data. if I dont add the dependency filterValues keep after new data update but the datePicker component will never recibe new updates only recives the initial state.
Using state to save the filterValues and set in Onchange doesn't work.
Beta Was this translation helpful? Give feedback.
All reactions