Skip to content

Commit

Permalink
hide taxonomies filters by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Aug 8, 2022
1 parent 89f8f59 commit 185ab9d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,14 @@ export default function QueryInspectorControls( {
{ !! taxonomiesInfo?.length && (
<ToolsPanelItem
label={ __( 'Taxonomies' ) }
hasValue={ () => !! taxQuery }
hasValue={ () =>
Object.values( taxQuery || {} ).some(
( terms ) => !! terms.length
)
}
onDeselect={ () =>
setQuery( { taxQuery: null } )
}
isShownByDefault
>
<TaxonomyControls
onChange={ setQuery }
Expand Down

0 comments on commit 185ab9d

Please sign in to comment.