@etsoo/materialui 1.3.77 → 1.3.78

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.
@@ -4,7 +4,7 @@ import { IconButton, InputAdornment, TextField } from "@mui/material";
4
4
  import { MUGlobal } from "./MUGlobal";
5
5
  import { Clear, Visibility } from "@mui/icons-material";
6
6
  import { Keyboard } from "@etsoo/shared";
7
- import { useCombinedRefs, useDelayedExecutor } from "@etsoo/react";
7
+ import { ReactUtils, useCombinedRefs, useDelayedExecutor } from "@etsoo/react";
8
8
  export const TextFieldEx = React.forwardRef((props, ref) => {
9
9
  // Destructure
10
10
  const { changeDelay, error, fullWidth = true, helperText, InputLabelProps = {}, InputProps = {}, onChange, onKeyDown, onEnter, onVisibility, inputRef, readOnly, showClear, showPassword, type, variant = MUGlobal.textFieldVariant, ...rest } = props;
@@ -33,10 +33,8 @@ export const TextFieldEx = React.forwardRef((props, ref) => {
33
33
  };
34
34
  const clearClick = () => {
35
35
  if (input != null) {
36
- input.value = "";
36
+ ReactUtils.triggerChange(input, "", false);
37
37
  input.focus();
38
- // Trigger 'input' instead of 'change' (not working) event manually
39
- input.dispatchEvent(new Event("input", { bubbles: true }));
40
38
  }
41
39
  };
42
40
  const preventDefault = (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.3.77",
3
+ "version": "1.3.78",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -71,9 +71,9 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@babel/cli": "^7.24.8",
74
- "@babel/core": "^7.24.9",
74
+ "@babel/core": "^7.25.2",
75
75
  "@babel/plugin-transform-runtime": "^7.24.7",
76
- "@babel/preset-env": "^7.25.0",
76
+ "@babel/preset-env": "^7.25.2",
77
77
  "@babel/preset-react": "^7.24.7",
78
78
  "@babel/preset-typescript": "^7.24.7",
79
79
  "@babel/runtime-corejs3": "^7.25.0",
@@ -87,8 +87,8 @@
87
87
  "@types/react-dom": "^18.3.0",
88
88
  "@types/react-input-mask": "^3.0.5",
89
89
  "@types/react-window": "^1.8.8",
90
- "@typescript-eslint/eslint-plugin": "^7.17.0",
91
- "@typescript-eslint/parser": "^7.17.0",
90
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
91
+ "@typescript-eslint/parser": "^7.18.0",
92
92
  "jest": "^29.7.0",
93
93
  "jest-environment-jsdom": "^29.7.0",
94
94
  "typescript": "^5.5.4"
@@ -8,7 +8,7 @@ import {
8
8
  import { MUGlobal } from "./MUGlobal";
9
9
  import { Clear, Visibility } from "@mui/icons-material";
10
10
  import { Keyboard } from "@etsoo/shared";
11
- import { useCombinedRefs, useDelayedExecutor } from "@etsoo/react";
11
+ import { ReactUtils, useCombinedRefs, useDelayedExecutor } from "@etsoo/react";
12
12
 
13
13
  /**
14
14
  * Extended text field props
@@ -114,11 +114,8 @@ export const TextFieldEx = React.forwardRef<
114
114
 
115
115
  const clearClick = () => {
116
116
  if (input != null) {
117
- input.value = "";
117
+ ReactUtils.triggerChange(input, "", false);
118
118
  input.focus();
119
-
120
- // Trigger 'input' instead of 'change' (not working) event manually
121
- input.dispatchEvent(new Event("input", { bubbles: true }));
122
119
  }
123
120
  };
124
121