@etsoo/react 1.7.10 → 1.7.11
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/lib/app/ReactUtils.js +5 -1
- package/package.json +1 -1
- package/src/app/ReactUtils.ts +6 -1
package/lib/app/ReactUtils.js
CHANGED
|
@@ -109,7 +109,8 @@ export var ReactUtils;
|
|
|
109
109
|
if (local && local(item, value) !== false) {
|
|
110
110
|
continue;
|
|
111
111
|
}
|
|
112
|
-
else if (item instanceof HTMLInputElement
|
|
112
|
+
else if (item instanceof HTMLInputElement ||
|
|
113
|
+
item instanceof HTMLTextAreaElement) {
|
|
113
114
|
item.value = `${value !== null && value !== void 0 ? value : ''}`;
|
|
114
115
|
}
|
|
115
116
|
else {
|
|
@@ -142,6 +143,9 @@ export var ReactUtils;
|
|
|
142
143
|
else if (item instanceof HTMLInputElement) {
|
|
143
144
|
data[k] = DomUtils.getInputValue(item);
|
|
144
145
|
}
|
|
146
|
+
else if (item instanceof HTMLTextAreaElement) {
|
|
147
|
+
data[k] = item.value;
|
|
148
|
+
}
|
|
145
149
|
else {
|
|
146
150
|
data[k] = item.value;
|
|
147
151
|
}
|
package/package.json
CHANGED
package/src/app/ReactUtils.ts
CHANGED
|
@@ -136,7 +136,10 @@ export namespace ReactUtils {
|
|
|
136
136
|
|
|
137
137
|
if (local && local(item, value) !== false) {
|
|
138
138
|
continue;
|
|
139
|
-
} else if (
|
|
139
|
+
} else if (
|
|
140
|
+
item instanceof HTMLInputElement ||
|
|
141
|
+
item instanceof HTMLTextAreaElement
|
|
142
|
+
) {
|
|
140
143
|
item.value = `${value ?? ''}`;
|
|
141
144
|
} else {
|
|
142
145
|
(item as any).value = value;
|
|
@@ -177,6 +180,8 @@ export namespace ReactUtils {
|
|
|
177
180
|
data[k] = local(item);
|
|
178
181
|
} else if (item instanceof HTMLInputElement) {
|
|
179
182
|
data[k] = DomUtils.getInputValue(item) as any;
|
|
183
|
+
} else if (item instanceof HTMLTextAreaElement) {
|
|
184
|
+
data[k] = item.value as any;
|
|
180
185
|
} else {
|
|
181
186
|
data[k] = (item as any).value;
|
|
182
187
|
}
|