Skip to content

Commit

Permalink
fix(fields): fix disabled prop in select component
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Dec 20, 2023
1 parent 2d5c81b commit ab49d6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fields/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ export function Select<OptionValue extends OptionValueType = string>({
)

const disabledItemValues = useMemo(
() => options.filter(option => option.isDisabled).map(option => option.value),
[options]
() => (controlledRsuiteData || rsuiteData).filter(option => option.isDisabled).map(option => option.value),
[controlledRsuiteData, rsuiteData]
)

useFieldUndefineEffect(isUndefinedWhenDisabled && disabled, onChange)
Expand Down

0 comments on commit ab49d6e

Please sign in to comment.