diff --git a/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js b/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js index 4aa7fc9bb56829..698271cf89a07a 100644 --- a/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js +++ b/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js @@ -29,6 +29,8 @@ const DEFAULT_QUERY = { _fields: 'id,name,parent', }; +const MIN_TERMS_COUNT_FOR_FILTER = 8; + class HierarchicalTermSelector extends Component { constructor() { super( ...arguments ); @@ -384,14 +386,15 @@ class HierarchicalTermSelector extends Component { slug === 'category' ? __( 'Categories' ) : __( 'Terms' ) ) ); + const showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER; return [ - , -