@dile/ui 3.19.1 → 3.19.2
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/mixins/form/src/DileForm.js +13 -13
- package/package.json +2 -2
|
@@ -69,7 +69,9 @@ export const DileForm = (superclass) => class extends superclass {
|
|
|
69
69
|
node.value = value;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
} else if (!isArray && adaptedData[fieldName]
|
|
72
|
+
} else if (!isArray && adaptedData[fieldName] === null) {
|
|
73
|
+
this._clearNode(node);
|
|
74
|
+
} else if (!isArray && adaptedData[fieldName] !== undefined) {
|
|
73
75
|
if (typeof node.set === "function") {
|
|
74
76
|
node.set(adaptedData[fieldName]);
|
|
75
77
|
} else {
|
|
@@ -80,13 +82,15 @@ export const DileForm = (superclass) => class extends superclass {
|
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
clearData() {
|
|
83
|
-
this.allNodeElements.forEach(node =>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
85
|
+
this.allNodeElements.forEach(node => this._clearNode(node));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
_clearNode(node) {
|
|
89
|
+
if (typeof node.clear === "function") {
|
|
90
|
+
node.clear();
|
|
91
|
+
} else {
|
|
92
|
+
node.value = '';
|
|
93
|
+
}
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
get allNodeElements() {
|
|
@@ -143,11 +147,7 @@ export const DileForm = (superclass) => class extends superclass {
|
|
|
143
147
|
clearField(name) {
|
|
144
148
|
const node = this.getNodeElement(name);
|
|
145
149
|
if (node) {
|
|
146
|
-
|
|
147
|
-
node.clear();
|
|
148
|
-
} else {
|
|
149
|
-
node.value = '';
|
|
150
|
-
}
|
|
150
|
+
this._clearNode(node);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dile/ui",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.2",
|
|
4
4
|
"description": "UI Core components from dile-components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "545b8f87465a4567904c577699562f3c5f676e68"
|
|
32
32
|
}
|