chanzuckerberg / sci-components

2021 Science Design System Component Library
https://chanzuckerberg.github.io/sci-components/
MIT License
25 stars 7 forks source link

Fix ComplexFilter re-rendering bug #823

Closed masoudmanson closed 3 months ago

masoudmanson commented 3 months ago

Reported by: @codemonkey800

For some reason when changing the options, it re-renders two times for some reason. because of how our application is built, the extra re-render causes a 2nd request to the backend. I'm currently looking into it right now but curious if y'all have any ideas on what could be the issue. more context can be found here:

https://github.com/chanzuckerberg/cryoet-data-portal/issues/747#issuecomment-2264030209

the following sample code was used to test the filter:

https://github.com/chanzuckerberg/cryoet-data-portal/issues/747#issuecomment-2264035698

prior to the upgrade, the above code worked as expected and only re-renders once. however, after the upgrade it now re-renders twice