Skip to content

Commit

Permalink
Archives Block: Fix reset button display state (#68757)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
  • 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

1 comment on commit bd2c328

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in bd2c328.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12841832451
📝 Reported issues:

Please sign in to comment.