@etsoo/react 1.8.96 → 1.8.98
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.
|
@@ -22,7 +22,7 @@ export declare namespace ReactUtils {
|
|
|
22
22
|
* @param value New value
|
|
23
23
|
* @param cancelable Cancelable
|
|
24
24
|
*/
|
|
25
|
-
function triggerChange(input: HTMLInputElement, value: string, cancelable?: boolean): void;
|
|
25
|
+
function triggerChange(input: HTMLInputElement | HTMLTextAreaElement, value: string, cancelable?: boolean): void;
|
|
26
26
|
/**
|
|
27
27
|
* Update refs
|
|
28
28
|
* @param refs Refs
|
|
@@ -67,7 +67,9 @@ var ReactUtils;
|
|
|
67
67
|
// input.value = newValue will not trigger the change event
|
|
68
68
|
// input type = 'hidden' will also not trigger the event
|
|
69
69
|
// https://coryrylan.com/blog/trigger-input-updates-with-react-controlled-inputs
|
|
70
|
-
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(
|
|
70
|
+
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(input.type === "textarea"
|
|
71
|
+
? HTMLTextAreaElement.prototype
|
|
72
|
+
: HTMLInputElement.prototype, property)?.set;
|
|
71
73
|
if (checked) {
|
|
72
74
|
const checkedValue = input.value == value;
|
|
73
75
|
nativeInputValueSetter?.call(input, checkedValue);
|
|
@@ -22,7 +22,7 @@ export declare namespace ReactUtils {
|
|
|
22
22
|
* @param value New value
|
|
23
23
|
* @param cancelable Cancelable
|
|
24
24
|
*/
|
|
25
|
-
function triggerChange(input: HTMLInputElement, value: string, cancelable?: boolean): void;
|
|
25
|
+
function triggerChange(input: HTMLInputElement | HTMLTextAreaElement, value: string, cancelable?: boolean): void;
|
|
26
26
|
/**
|
|
27
27
|
* Update refs
|
|
28
28
|
* @param refs Refs
|
|
@@ -64,7 +64,9 @@ export var ReactUtils;
|
|
|
64
64
|
// input.value = newValue will not trigger the change event
|
|
65
65
|
// input type = 'hidden' will also not trigger the event
|
|
66
66
|
// https://coryrylan.com/blog/trigger-input-updates-with-react-controlled-inputs
|
|
67
|
-
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(
|
|
67
|
+
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(input.type === "textarea"
|
|
68
|
+
? HTMLTextAreaElement.prototype
|
|
69
|
+
: HTMLInputElement.prototype, property)?.set;
|
|
68
70
|
if (checked) {
|
|
69
71
|
const checkedValue = input.value == value;
|
|
70
72
|
nativeInputValueSetter?.call(input, checkedValue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.98",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"@emotion/styled": "^11.14.1",
|
|
41
41
|
"@etsoo/appscript": "^1.6.72",
|
|
42
42
|
"@etsoo/notificationbase": "^1.1.74",
|
|
43
|
-
"@etsoo/shared": "^1.2.
|
|
43
|
+
"@etsoo/shared": "^1.2.90",
|
|
44
44
|
"react": "^19.2.7",
|
|
45
45
|
"react-dom": "^19.2.7",
|
|
46
46
|
"react-router-dom": "^7.18.1",
|
|
47
|
-
"react-window": "^2.
|
|
47
|
+
"react-window": "^2.3.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/core": "^8.0.1",
|
|
51
51
|
"@babel/plugin-transform-runtime": "^8.0.1",
|
|
52
52
|
"@babel/preset-env": "^8.0.2",
|
|
53
53
|
"@babel/runtime-corejs3": "^8.0.0",
|
|
54
|
-
"@testing-library/jest-dom": "^
|
|
54
|
+
"@testing-library/jest-dom": "^7.0.0",
|
|
55
55
|
"@testing-library/react": "^16.3.2",
|
|
56
56
|
"@types/react": "^19.2.17",
|
|
57
57
|
"@types/react-dom": "^19.2.3",
|
package/src/app/ReactUtils.ts
CHANGED
|
@@ -59,7 +59,7 @@ export namespace ReactUtils {
|
|
|
59
59
|
* @param cancelable Cancelable
|
|
60
60
|
*/
|
|
61
61
|
export function triggerChange(
|
|
62
|
-
input: HTMLInputElement,
|
|
62
|
+
input: HTMLInputElement | HTMLTextAreaElement,
|
|
63
63
|
value: string,
|
|
64
64
|
cancelable: boolean = false
|
|
65
65
|
) {
|
|
@@ -76,7 +76,9 @@ export namespace ReactUtils {
|
|
|
76
76
|
// input type = 'hidden' will also not trigger the event
|
|
77
77
|
// https://coryrylan.com/blog/trigger-input-updates-with-react-controlled-inputs
|
|
78
78
|
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(
|
|
79
|
-
|
|
79
|
+
input.type === "textarea"
|
|
80
|
+
? HTMLTextAreaElement.prototype
|
|
81
|
+
: HTMLInputElement.prototype,
|
|
80
82
|
property
|
|
81
83
|
)?.set;
|
|
82
84
|
|