Skip to content

Commit

Permalink
fix(InlineEdit): edge case when a field is required with blank spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Gbacc committed Dec 23, 2024
1 parent 6734919 commit 8523646
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ten-paws-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/design-system': patch
---

InlineEdit - Fix been able to submit field when required and having blank spaces
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 8523646

Please sign in to comment.