Skip to content

Commit

Permalink
Fix empty dirty fields breaking sending (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffersonBledsoe authored Aug 3, 2023
1 parent 98c3b6b commit a26ebd9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nsw-design-system-plone6",
"version": "0.7.0",
"version": "0.7.1-canary0",
"description": "nsw-design-system-plone6: Volto add-on",
"main": "src/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/addons/volto-form-block
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ function EmailWidget(props) {
value={value}
onClick={() => onClick()}
onBlur={({ target }) =>
onBlur(id, target.value === '' ? undefined : target.value)
onBlur(id, target.value === '' ? null : target.value)
}
onChange={({ target }) => {
return onChange(id, target.value === '' ? undefined : target.value);
return onChange(id, target.value === '' ? null : target.value);
}}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function SelectWidget(props) {
id,
selectedOption && selectedOption.value !== 'no-value'
? selectedOption.value
: undefined,
: null,
);
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ function TextWidget(props) {
value={value}
onClick={() => onClick()}
onBlur={({ target }) =>
onBlur(id, target.value === '' ? undefined : target.value)
onBlur(id, target.value === '' ? null : target.value)
}
onChange={({ target }) => {
return onChange(id, target.value === '' ? undefined : target.value);
return onChange(id, target.value === '' ? null : target.value);
}}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const TextareaWidget = (props) => {
placeholder={placeholder}
disabled={isDisabled}
onChange={({ target }) =>
onhandleChange(id, target.value === '' ? undefined : target.value)
onhandleChange(id, target.value === '' ? null : target.value)
}
{...attributes}
></textarea>
Expand Down

0 comments on commit a26ebd9

Please sign in to comment.