informatics-isi-edu / deriva-webapps

Deriva-based web applications
Apache License 2.0
2 stars 1 forks source link

React matrix search width bug #136

Closed cheekw closed 1 year ago

cheekw commented 1 year ago
RFSH commented 1 year ago

@cheekw hmm, do you know why memo might have caused this?

cheekw commented 1 year ago

@cheekw hmm, do you know why memo might have caused this?

memo() basically skips re-rendering unless props change. But it doesn't do a deep equality check. Since we were wrapping SearchBar with memo() and were passing values through an object selectProps, it assumes that props haven't changed, causing it to not re-render.