@etsoo/materialui 1.0.39 → 1.0.41
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/DataSteps.js +7 -1
- package/package.json +1 -1
- package/src/DataSteps.tsx +8 -1
package/lib/DataSteps.js
CHANGED
|
@@ -64,6 +64,10 @@ export function DataSteps(props) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
+
const cancelInput = (event) => {
|
|
68
|
+
event.stopPropagation();
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
};
|
|
67
71
|
React.useEffect(() => {
|
|
68
72
|
if (jsonValue) {
|
|
69
73
|
dataRef.current = JSON.parse(jsonValue);
|
|
@@ -71,7 +75,9 @@ export function DataSteps(props) {
|
|
|
71
75
|
}
|
|
72
76
|
}, [jsonValue]);
|
|
73
77
|
return (React.createElement(TextField, { InputLabelProps: InputLabelProps, InputProps: {
|
|
74
|
-
|
|
78
|
+
onKeyDown: cancelInput,
|
|
79
|
+
onPaste: cancelInput,
|
|
80
|
+
sx: { cursor: 'pointer' },
|
|
75
81
|
endAdornment: (React.createElement(InputAdornment, { position: "end" },
|
|
76
82
|
React.createElement(IconButton, { edge: "end", size: "small" },
|
|
77
83
|
React.createElement(StartIcon, null))))
|
package/package.json
CHANGED
package/src/DataSteps.tsx
CHANGED
|
@@ -166,6 +166,11 @@ export function DataSteps<T extends object>(props: DataStepsProps<T>) {
|
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
168
|
|
|
169
|
+
const cancelInput = (event: React.SyntheticEvent) => {
|
|
170
|
+
event.stopPropagation();
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
};
|
|
173
|
+
|
|
169
174
|
React.useEffect(() => {
|
|
170
175
|
if (jsonValue) {
|
|
171
176
|
dataRef.current = JSON.parse(jsonValue);
|
|
@@ -177,7 +182,9 @@ export function DataSteps<T extends object>(props: DataStepsProps<T>) {
|
|
|
177
182
|
<TextField
|
|
178
183
|
InputLabelProps={InputLabelProps}
|
|
179
184
|
InputProps={{
|
|
180
|
-
|
|
185
|
+
onKeyDown: cancelInput,
|
|
186
|
+
onPaste: cancelInput,
|
|
187
|
+
sx: { cursor: 'pointer' },
|
|
181
188
|
endAdornment: (
|
|
182
189
|
<InputAdornment position="end">
|
|
183
190
|
<IconButton edge="end" size="small">
|