Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into 814-implement-add-use-client-to-all-sds-components
  • Loading branch information
masoudmanson committed Aug 8, 2024
2 parents 7e58fde + 0692409 commit b84e4b1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/components/src/core/ComplexFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,25 +178,17 @@ const ComplexFilter = <
if (isTriggerChangeOnOptionClick) {
setPendingValue(newValue);

return setValueAndCallOnChange(event, newValue);
return setValue(newValue);
}

return setPendingValue(newValue);
}

setValueAndCallOnChange(event, newValue);
setValue(newValue);

if (!multiple) setOpen(false);
}

function setValueAndCallOnChange(
event: React.SyntheticEvent,
newValue: AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>
) {
setValue(newValue);
onChange?.(newValue);
}

function handleDelete(option: DefaultAutocompleteOption) {
if (!multiple) {
return setValue(
Expand Down

0 comments on commit b84e4b1

Please sign in to comment.