Skip to content

Commit

Permalink
[@mantine/core] MultiSelect: Forbid select item removal if associated…
Browse files Browse the repository at this point in the history
… item becomes disabled (#5630)
  • Loading branch information
Phirb authored Jan 27, 2024
1 parent d1f047b commit 49ce186
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const MultiSelect = factory<MultiSelectFactory>((_props, ref) => {
const values = _value.map((item, index) => (
<Pill
key={`${item}-${index}`}
withRemoveButton={!readOnly}
withRemoveButton={!readOnly && !optionsLockup[item]?.disabled}
onRemove={() => setValue(_value.filter((i) => item !== i))}
unstyled={unstyled}
{...getStyles('pill')}
Expand Down

0 comments on commit 49ce186

Please sign in to comment.