diff --git a/.changeset/ten-paws-love.md b/.changeset/ten-paws-love.md new file mode 100644 index 00000000000..61a8e85a1cb --- /dev/null +++ b/.changeset/ten-paws-love.md @@ -0,0 +1,5 @@ +--- +'@talend/design-system': patch +--- + +InlineEdit - Fix been able to submit field when required and having blank spaces diff --git a/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx b/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx index ce3b74a7a85..b6a490ec380 100644 --- a/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx +++ b/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx @@ -140,7 +140,7 @@ const InlineEditingPrimitive = forwardRef( // eslint-disable-next-line react-hooks/exhaustive-deps const getValue = () => (onChangeValue ? value : internalValue); const inputIsValid = () => { - return !required || !!getValue(); + return !required || !!getValue()?.trim(); }; const toggleEditionMode = (isEditionMode: boolean) => {