Commit c358b58
Jake Stanger
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.1 parent 36753f1 commit c358b58
File tree
1 file changed
+1
-0
lines changed- src/controls/modernTaxonomyPicker/taxonomyTree
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| 662 | + | |
662 | 663 | | |
663 | 664 | | |
664 | 665 | | |
| |||
0 commit comments