diff --git a/plugins/woocommerce-blocks/assets/js/base/components/checkbox-list/index.tsx b/plugins/woocommerce-blocks/assets/js/base/components/checkbox-list/index.tsx index 83a8ad0039f..198dc614608 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/checkbox-list/index.tsx +++ b/plugins/woocommerce-blocks/assets/js/base/components/checkbox-list/index.tsx @@ -21,7 +21,7 @@ interface CheckboxListProps { isDisabled?: boolean; limit?: number; checked?: string[]; - onChange?: ( value: string ) => void; + onChange: ( value: string ) => void; options?: CheckboxListOptions[]; } @@ -39,7 +39,7 @@ interface CheckboxListProps { */ const CheckboxList = ( { className, - onChange = () => void 0, + onChange, options = [], checked = [], isLoading = false, diff --git a/plugins/woocommerce-blocks/assets/js/base/components/price-slider/index.tsx b/plugins/woocommerce-blocks/assets/js/base/components/price-slider/index.tsx index 7f8bfc846c3..d1f31432c94 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/price-slider/index.tsx +++ b/plugins/woocommerce-blocks/assets/js/base/components/price-slider/index.tsx @@ -49,7 +49,7 @@ export interface PriceSliderProps { /** * Function to call on the change event. */ - onChange?: ( value: [ number, number ] ) => void; + onChange: ( value: [ number, number ] ) => void; /** * Function to call when submit event fires. */ @@ -73,7 +73,7 @@ const PriceSlider = ( { maxPrice, minConstraint, maxConstraint, - onChange = () => void 0, + onChange, step, currency, showInputFields = true, diff --git a/plugins/woocommerce-blocks/assets/js/base/components/radio-control/index.tsx b/plugins/woocommerce-blocks/assets/js/base/components/radio-control/index.tsx index 82d14f3a581..2405eacf96b 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/radio-control/index.tsx +++ b/plugins/woocommerce-blocks/assets/js/base/components/radio-control/index.tsx @@ -15,7 +15,7 @@ const RadioControl = ( { className = '', id, selected, - onChange = () => void 0, + onChange, options = [], }: RadioControlProps ): JSX.Element | null => { const instanceId = useInstanceId( RadioControl ); diff --git a/plugins/woocommerce-blocks/assets/js/base/components/sort-select/index.tsx b/plugins/woocommerce-blocks/assets/js/base/components/sort-select/index.tsx index 1af0843586b..446abfc0bf8 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/sort-select/index.tsx +++ b/plugins/woocommerce-blocks/assets/js/base/components/sort-select/index.tsx @@ -42,7 +42,7 @@ interface SortSelectProps { /** * The selected value. */ - value: string; + value?: string; } /** @@ -56,7 +56,7 @@ const SortSelect = ( { onChange, options, screenReaderLabel, - value, + value = '', }: SortSelectProps ): JSX.Element => { const selectId = `wc-block-components-sort-select__select-${ instanceId }`;