Skip to content

Commit

Permalink
Archives Block: Fix reset button display state (WordPress#68757)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Jan 18, 2025
1 parent 63523f2 commit bd2c328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/archives/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
<ToolsPanelItem
label={ __( 'Show label' ) }
isShownByDefault
hasValue={ () => showLabel }
hasValue={ () => ! showLabel }
onDeselect={ () =>
setAttributes( { showLabel: false } )
}
Expand Down Expand Up @@ -102,7 +102,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
<ToolsPanelItem
label={ __( 'Group by' ) }
isShownByDefault
hasValue={ () => !! type }
hasValue={ () => type !== 'monthly' }
onDeselect={ () =>
setAttributes( { type: 'monthly' } )
}
Expand Down

0 comments on commit bd2c328

Please sign in to comment.