mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 20:13:21 +03:00
fix: Array data type accepts whitespace as input (#7707)
## Description - This PR fixes the issue #7593 Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
parent
ba2ee0da72
commit
03dd7527b7
@ -18,6 +18,7 @@ import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useLis
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import { moveArrayItem } from '~/utils/array/moveArrayItem';
|
||||
import { toSpliced } from '~/utils/array/toSpliced';
|
||||
import { turnIntoEmptyStringIfWhitespacesOnly } from '~/utils/string/turnIntoEmptyStringIfWhitespacesOnly';
|
||||
|
||||
const StyledDropdownMenu = styled(DropdownMenu)`
|
||||
left: -1px;
|
||||
@ -190,7 +191,11 @@ export const MultiItemFieldInput = <T,>({
|
||||
})
|
||||
: undefined
|
||||
}
|
||||
onChange={(event) => handleOnChange(event.target.value)}
|
||||
onChange={(event) =>
|
||||
handleOnChange(
|
||||
turnIntoEmptyStringIfWhitespacesOnly(event.target.value),
|
||||
)
|
||||
}
|
||||
onEnter={handleSubmitInput}
|
||||
rightComponent={
|
||||
<LightIconButton
|
||||
|
Loading…
Reference in New Issue
Block a user