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
When animate={true} in a virtualized table (e.g. Facebook's FixedDataTable) and the table is rerendered for whatever reason (e.g. pagination, filtering), the switches show the toggling animation. This leads to a misleading UX, as no state is actually changing. This occurs because the switches are not actually being unmounted / re-mounted, and as such any switch whose state is changed will think that it is toggled.
I'm having trouble thinking about an elegant fix. Initially for my scenario, I added state to enable animation only when the switch is clicked, or when a 'toggle all' button is pressed. However I'm not sure how the component can distinguish whether its value is changing due to a 'toggle all' being pressed or if the virtual table data has changed.
Has anyone had a similar issue?
The text was updated successfully, but these errors were encountered:
When
animate={true}
in a virtualized table (e.g. Facebook's FixedDataTable) and the table is rerendered for whatever reason (e.g. pagination, filtering), the switches show the toggling animation. This leads to a misleading UX, as no state is actually changing. This occurs because the switches are not actually being unmounted / re-mounted, and as such any switch whose state is changed will think that it is toggled.I'm having trouble thinking about an elegant fix. Initially for my scenario, I added state to enable animation only when the switch is clicked, or when a 'toggle all' button is pressed. However I'm not sure how the component can distinguish whether its value is changing due to a 'toggle all' being pressed or if the virtual table data has changed.
Has anyone had a similar issue?
The text was updated successfully, but these errors were encountered: