fix: ensure the button is always open

This commit is contained in:
Tung Du 2024-09-17 20:22:40 +07:00
parent 07ab80f17e
commit 73f9189258
1 changed files with 6 additions and 2 deletions

View File

@ -62,7 +62,10 @@ export const Edit = ( {
const [ overlayNavigationAttributes, setOverlayNavigationAttributes ] =
useLocalStorageState< Record< string, unknown > >(
'product-filters-overlay-navigation-attributes',
{}
{
lock: { remove: true },
triggerType: 'open-overlay',
}
);
const { updateBlockAttributes, insertBlock, removeBlock } =
@ -114,7 +117,8 @@ export const Edit = ( {
insertBlock(
createBlock(
'woocommerce/product-filters-overlay-navigation',
overlayNavigationAttributes || {
{
...overlayNavigationAttributes,
lock: { remove: true },
triggerType: 'open-overlay',
}