diff --git a/plugins/woocommerce-blocks/packages/interactivity-components/dropdown/index.ts b/plugins/woocommerce-blocks/packages/interactivity-components/dropdown/index.ts index 1285048ac2b..0aae0bedff6 100644 --- a/plugins/woocommerce-blocks/packages/interactivity-components/dropdown/index.ts +++ b/plugins/woocommerce-blocks/packages/interactivity-components/dropdown/index.ts @@ -20,15 +20,14 @@ export type DropdownContext = { }; store( 'woocommerce/interactivity-dropdown', { - state: {}, - selectors: { - placeholderText: () => { + state: { + get placeholderText() { const context = getContext< DropdownContext >(); const { selectedItem } = context; return selectedItem.label || 'Select an option'; }, - isSelected: () => { + get isSelected() { const context = getContext< DropdownContext >(); const { diff --git a/plugins/woocommerce-blocks/src/InteractivityComponents/Dropdown.php b/plugins/woocommerce-blocks/src/InteractivityComponents/Dropdown.php index a6893c76272..f3be2426d7e 100644 --- a/plugins/woocommerce-blocks/src/InteractivityComponents/Dropdown.php +++ b/plugins/woocommerce-blocks/src/InteractivityComponents/Dropdown.php @@ -47,7 +47,7 @@ class Dropdown { tabindex="-1" data-wc-on--click="actions.toggleIsOpen" > - +