Skip to content

Commit

Permalink
Update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
brookewp committed Feb 1, 2024
1 parent 5fdc91c commit 5babba6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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: '',
};
Expand Down

0 comments on commit 5babba6

Please sign in to comment.