Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Fix filter count display toggle #10096

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve check
gigitux committed Jul 4, 2023
commit 89a78ae80061dfd8aa1f6174d1edd7dc105dca4f
2 changes: 1 addition & 1 deletion assets/js/blocks/attribute-filter/utils.ts
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ export const parseAttributes = ( data: Record< string, unknown > ) => {
isString( data?.attributeId ) ? data.attributeId : '0',
10
),
showCounts: data?.showCounts !== 'false',
showCounts: data?.showCounts === 'true',
queryType:
( isString( data?.queryType ) && data.queryType ) ||
metadata.attributes.queryType.default,
2 changes: 1 addition & 1 deletion assets/js/blocks/stock-filter/utils.ts
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ export const parseAttributes = ( data: Record< string, unknown > ) => {
parseInt( data.headingLevel, 10 ) ) ||
metadata.attributes.headingLevel.default,
showFilterButton: data?.showFilterButton === 'true',
showCounts: data?.showCounts !== 'false',
showCounts: data?.showCounts === 'true',
isPreview: false,
displayStyle:
( isString( data?.displayStyle ) && data.displayStyle ) ||