@etsoo/materialui 1.3.75 → 1.3.77
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/TextFieldEx.js +2 -5
- package/package.json +1 -1
- package/src/TextFieldEx.tsx +2 -6
package/lib/TextFieldEx.js
CHANGED
|
@@ -35,12 +35,9 @@ export const TextFieldEx = React.forwardRef((props, ref) => {
|
|
|
35
35
|
if (input != null) {
|
|
36
36
|
input.value = "";
|
|
37
37
|
input.focus();
|
|
38
|
+
// Trigger 'input' instead of 'change' (not working) event manually
|
|
39
|
+
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
38
40
|
}
|
|
39
|
-
if (errorText != null) {
|
|
40
|
-
// Reset
|
|
41
|
-
updateErrorText(undefined);
|
|
42
|
-
}
|
|
43
|
-
updateEmpty(true);
|
|
44
41
|
};
|
|
45
42
|
const preventDefault = (e) => {
|
|
46
43
|
// Prevent long press
|
package/package.json
CHANGED
package/src/TextFieldEx.tsx
CHANGED
|
@@ -116,14 +116,10 @@ export const TextFieldEx = React.forwardRef<
|
|
|
116
116
|
if (input != null) {
|
|
117
117
|
input.value = "";
|
|
118
118
|
input.focus();
|
|
119
|
-
}
|
|
120
119
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
updateErrorText(undefined);
|
|
120
|
+
// Trigger 'input' instead of 'change' (not working) event manually
|
|
121
|
+
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
124
122
|
}
|
|
125
|
-
|
|
126
|
-
updateEmpty(true);
|
|
127
123
|
};
|
|
128
124
|
|
|
129
125
|
const preventDefault = (e: React.TouchEvent | React.MouseEvent) => {
|