From 5babba6053e05e44a1d4cb4b9f9bdd8415ec0862 Mon Sep 17 00:00:00 2001 From: brookewp Date: Wed, 31 Jan 2024 16:43:25 -0800 Subject: [PATCH] Update naming --- .../legacy-component/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/components/src/custom-select-control-v2/legacy-component/index.tsx b/packages/components/src/custom-select-control-v2/legacy-component/index.tsx index c2d25dc8f9abd0..16b2662554648b 100644 --- a/packages/components/src/custom-select-control-v2/legacy-component/index.tsx +++ b/packages/components/src/custom-select-control-v2/legacy-component/index.tsx @@ -23,13 +23,13 @@ function _LegacyCustomSelect( props: LegacyCustomSelectProps ) { options, onChange, size = 'default', - value: valueProp, + value, ...restProps } = props; // Forward props + store from v2 implementation const store = Ariakit.useSelectStore( { - async setValue( value ) { + async setValue( nextValue ) { if ( ! onChange ) return; // Executes the logic in a microtask after the popup is closed. @@ -39,13 +39,13 @@ function _LegacyCustomSelect( props: LegacyCustomSelectProps ) { const changeObject = { highlightedIndex: state.renderedItems.findIndex( - ( item ) => item.value === value + ( item ) => item.value === nextValue ), inputValue: '', isOpen: state.open, selectedItem: { - name: value, - key: value, + name: nextValue as string, + key: nextValue as string, }, type: '', };