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