Project

General

Profile

« Previous | Next » 

Revision c338ce2d

Added by Tomer Brisker over 3 years ago

Fixes #31599 - Simplify TaxonomySwitcher (#8242)

  • Fixes #31599 - Simplify TaxonomySwitcher

Move internals that depend on the taxonomy type into TaxonomyDropdown
instead of passing as a bunch of props.

  • Refs #31599 - use useReducer hook to filter taxonomies

Instead of using two states and an effect to handle filtering, using a
reducer lets us calculate the filtered taxonomies directly

  • Refs #31599 - use undefined to denote Any taxonomy scope

This is inline with what we do on the server side, removes the need to
do string comparisons and simplifies handling this case.

  • Refs #31599 - ensure taxonomyType is organization or location
  • added
  • modified
  • copied
  • renamed
  • deleted