Skip to content

Commit

Permalink
[@mantine/core] TagsInput: Fix required prop not working correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sunadoi committed Oct 12, 2023
1 parent 16b7826 commit 29fef91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mantine-core/src/components/TagsInput/TagsInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export const TagsInput = factory<TagsInputFactory>((_props, ref) => {
inputContainer,
inputWrapperOrder,
withAsterisk,
required,
labelProps,
descriptionProps,
errorProps,
Expand Down Expand Up @@ -335,6 +336,7 @@ export const TagsInput = factory<TagsInputFactory>((_props, ref) => {
inputContainer={inputContainer}
inputWrapperOrder={inputWrapperOrder}
withAsterisk={withAsterisk}
required={required}
labelProps={labelProps}
descriptionProps={descriptionProps}
errorProps={errorProps}
Expand Down Expand Up @@ -367,6 +369,7 @@ export const TagsInput = factory<TagsInputFactory>((_props, ref) => {
onPaste={handlePaste}
value={_searchValue}
onChange={(event) => setSearchValue(event.currentTarget.value)}
required={required && _value.length === 0}
disabled={disabled}
readOnly={readOnly}
id={_id}
Expand Down

0 comments on commit 29fef91

Please sign in to comment.