Skip to content

Commit

Permalink
fix(complexfilter): fixes re-render issue by passing initial prop val…
Browse files Browse the repository at this point in the history
…ue to state
  • Loading branch information
codemonkey800 committed Aug 13, 2024
1 parent 8ff0c0e commit 3be5bf2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/components/src/core/ComplexFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,15 @@ const ComplexFilter = <
FreeSolo
> {
return multiple
? ([] as unknown as AutocompleteValue<
T,
Multiple,
DisableClearable,
FreeSolo
>)
: (null as AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>);
? propValue ??
([] as unknown as AutocompleteValue<
T,
Multiple,
DisableClearable,
FreeSolo
>)
: propValue ??
(null as AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>);
}
};

Expand Down

0 comments on commit 3be5bf2

Please sign in to comment.