@stoker-platform/web-app 0.5.95 → 0.5.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/package.json +4 -4
- package/src/Form.tsx +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.96
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: improve Form null handling
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @stoker-platform/utils@0.5.45
|
|
10
|
+
- @stoker-platform/node-client@0.5.53
|
|
11
|
+
- @stoker-platform/web-client@0.5.54
|
|
12
|
+
|
|
3
13
|
## 0.5.95
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoker-platform/web-app",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.96",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"scripts": {
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
52
52
|
"@react-google-maps/api": "^2.20.8",
|
|
53
53
|
"@sentry/react": "^10.50.0",
|
|
54
|
-
"@stoker-platform/node-client": "0.5.
|
|
55
|
-
"@stoker-platform/utils": "0.5.
|
|
56
|
-
"@stoker-platform/web-client": "0.5.
|
|
54
|
+
"@stoker-platform/node-client": "0.5.53",
|
|
55
|
+
"@stoker-platform/utils": "0.5.45",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.54",
|
|
57
57
|
"@tanstack/react-table": "^8.21.3",
|
|
58
58
|
"@types/react": "18.3.13",
|
|
59
59
|
"@types/react-dom": "18.3.1",
|
package/src/Form.tsx
CHANGED
|
@@ -3836,6 +3836,14 @@ function RecordForm({
|
|
|
3836
3836
|
) {
|
|
3837
3837
|
delete values[field.name]
|
|
3838
3838
|
}
|
|
3839
|
+
|
|
3840
|
+
if (values[field.name] === null) {
|
|
3841
|
+
if (originalRecord?.[field.name]) {
|
|
3842
|
+
values[field.name] = deleteField()
|
|
3843
|
+
} else {
|
|
3844
|
+
delete values[field.name]
|
|
3845
|
+
}
|
|
3846
|
+
}
|
|
3839
3847
|
}
|
|
3840
3848
|
|
|
3841
3849
|
let userData: UserData | undefined
|
|
@@ -5113,12 +5121,6 @@ function RecordForm({
|
|
|
5113
5121
|
) {
|
|
5114
5122
|
form.setValue(field.name, 0)
|
|
5115
5123
|
}
|
|
5116
|
-
if (
|
|
5117
|
-
field.nullable &&
|
|
5118
|
-
form.getValues(field.name) === null
|
|
5119
|
-
) {
|
|
5120
|
-
form.setValue(field.name, undefined)
|
|
5121
|
-
}
|
|
5122
5124
|
}
|
|
5123
5125
|
form.handleSubmit(handleSubmit, (errors) => {
|
|
5124
5126
|
console.error(errors)
|
|
@@ -5634,9 +5636,6 @@ function RecordForm({
|
|
|
5634
5636
|
) {
|
|
5635
5637
|
form.setValue(field.name, 0)
|
|
5636
5638
|
}
|
|
5637
|
-
if (field.nullable && form.getValues(field.name) === null) {
|
|
5638
|
-
form.setValue(field.name, undefined)
|
|
5639
|
-
}
|
|
5640
5639
|
}
|
|
5641
5640
|
form.handleSubmit(handleSubmit, (errors) => {
|
|
5642
5641
|
console.error(errors)
|