Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(taxonomy tree): options remain selected when switching in single mode #1765

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Commits on Feb 14, 2024

  1. fix(taxonomy tree): options remain selected when switching in single …

    …mode
    
    This is a hack fix since the tree is already built on top of React anti-patterns, which cause this in the first place. In the future a full refactor is really required to sort this out at its roots.
    
    By adding an unstable `key`, it forces the component to re-render on every render. Without this, React assumes nothing has changed and does not react to the `selectedKey` update.
    
    For large trees with everything expanded, this could cause performance issues but should be okay in most cases.
    Jake Stanger committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    c358b58 View commit details
    Browse the repository at this point in the history