Simplify TaxonomySwitcher component
Fixed in Releases:
Found in Releases:
there are lots of TaxonomyDropdown internals being passed from TaxonomySwitcher component that can be handled inside the TaxonomyDropdown
#1 Updated by The Foreman Bot about 2 years ago
- Assignee set to Tomer Brisker
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8242 added
#2 Updated by The Foreman Bot about 2 years ago
- Fixed in Releases 2.4.0 added
#3 Updated by Tomer Brisker about 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|c338ce2d83e5f88416a38466f89980c51733f199.
Fixes #31599 - Simplify TaxonomySwitcher (#8242)
Move internals that depend on the taxonomy type into TaxonomyDropdown
instead of passing as a bunch of props.
Instead of using two states and an effect to handle filtering, using a
reducer lets us calculate the filtered taxonomies directly
This is inline with what we do on the server side, removes the need to
do string comparisons and simplifies handling this case.