Skip to content

Commit

Permalink
fix(autocomplete): revise isClearable logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Mar 5, 2024
1 parent 78e4087 commit 91ebc4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/components/autocomplete/src/use-autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
const isClearable =
originalProps.disableClearable !== undefined
? !originalProps.disableClearable
: originalProps.isReadOnly
? false
: originalProps.isClearable;

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ export const ReadOnly = {
...defaultProps,
selectedKey: "cat",
isReadOnly: true,
isClearable: false,
},
};

Expand Down

0 comments on commit 91ebc4a

Please sign in to comment.