@db-ux/react-core-components 4.3.0 → 4.3.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @db-ux/react-core-components
|
|
2
2
|
|
|
3
|
+
## 4.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(angular): issue with form-components not applying value changes because of [attr.value] instead of native [value] binding - [see commit 61ab4a3](https://github.com/db-ux-design-system/core-web/commit/61ab4a3e9a781459b829c74cf23624a23edd9e3f)
|
|
8
|
+
|
|
3
9
|
## 4.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -16,7 +16,7 @@ function DBInputFn(props, component) {
|
|
|
16
16
|
const [_invalidMessage, set_invalidMessage] = useState(() => undefined);
|
|
17
17
|
const [_dataListId, set_dataListId] = useState(() => undefined);
|
|
18
18
|
const [_descByIds, set_descByIds] = useState(() => undefined);
|
|
19
|
-
const [_value, set_value] = useState(() =>
|
|
19
|
+
const [_value, set_value] = useState(() => "");
|
|
20
20
|
const [_voiceOverFallback, set_voiceOverFallback] = useState(() => "");
|
|
21
21
|
const [abortController, setAbortController] = useState(() => undefined);
|
|
22
22
|
function hasValidState() {
|
|
@@ -114,10 +114,15 @@ function DBInputFn(props, component) {
|
|
|
114
114
|
}
|
|
115
115
|
}, [_id]);
|
|
116
116
|
useEffect(() => {
|
|
117
|
-
|
|
117
|
+
if (props.value !== undefined) {
|
|
118
|
+
set_value(props.value);
|
|
119
|
+
}
|
|
118
120
|
}, [props.value]);
|
|
119
121
|
useEffect(() => {
|
|
120
|
-
|
|
122
|
+
// If angular uses ngModel value and _value are null
|
|
123
|
+
// then the value will be set afterward and the _ref will be refreshed
|
|
124
|
+
const addResetListener = true;
|
|
125
|
+
if (_ref.current && addResetListener) {
|
|
121
126
|
const defaultValue = props.defaultValue;
|
|
122
127
|
let controller = abortController;
|
|
123
128
|
if (!controller) {
|
|
@@ -129,7 +129,10 @@ function DBSelectFn(props, component) {
|
|
|
129
129
|
set_value(props.value);
|
|
130
130
|
}, [props.value]);
|
|
131
131
|
useEffect(() => {
|
|
132
|
-
|
|
132
|
+
// If angular uses ngModel value and _value are null
|
|
133
|
+
// then the value will be set afterward and the _ref will be refreshed
|
|
134
|
+
const addResetListener = true;
|
|
135
|
+
if (_ref.current && addResetListener) {
|
|
133
136
|
const defaultValue = props.defaultValue;
|
|
134
137
|
let controller = abortController;
|
|
135
138
|
if (!controller) {
|
|
@@ -101,10 +101,15 @@ function DBTextareaFn(props, component) {
|
|
|
101
101
|
}
|
|
102
102
|
}, [_id]);
|
|
103
103
|
useEffect(() => {
|
|
104
|
-
|
|
104
|
+
if (props.value !== undefined) {
|
|
105
|
+
set_value(props.value);
|
|
106
|
+
}
|
|
105
107
|
}, [props.value]);
|
|
106
108
|
useEffect(() => {
|
|
107
|
-
|
|
109
|
+
// If angular uses ngModel value and _value are null
|
|
110
|
+
// then the value will be set afterward and the _ref will be refreshed
|
|
111
|
+
const addResetListener = true;
|
|
112
|
+
if (_ref.current && addResetListener) {
|
|
108
113
|
const defaultValue = props.defaultValue;
|
|
109
114
|
let controller = abortController;
|
|
110
115
|
if (!controller) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/react-core-components",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "React components for @db-ux/core-components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@db-ux/core-components": "4.3.
|
|
45
|
-
"@db-ux/core-foundations": "4.3.
|
|
44
|
+
"@db-ux/core-components": "4.3.1",
|
|
45
|
+
"@db-ux/core-foundations": "4.3.1"
|
|
46
46
|
}
|
|
47
47
|
}
|