Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit d65a3e1

Browse files
committed
Ensuring that debounce does not prevent select from changing viewValue. Fixes #994
1 parent c411557 commit d65a3e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/constants/control-props-map.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ const textPropsMap = {
5252
};
5353

5454
const getModelValue = ({ modelValue }) => modelValue;
55+
const getViewValue = (props) =>
56+
(props.hasOwnProperty('value') ? props.value : props.viewValue);
5557

5658
const controlPropsMap = {
5759
default: {
5860
...standardPropsMap,
59-
value: (props) => (props.hasOwnProperty('value')
60-
? props.value
61-
: props.viewValue),
61+
value: getViewValue,
6262
},
6363
checkbox: {
6464
...standardPropsMap,
@@ -73,7 +73,7 @@ const controlPropsMap = {
7373
},
7474
select: {
7575
...standardPropsMap,
76-
value: getModelValue,
76+
value: getViewValue,
7777
},
7878
text: textPropsMap,
7979
textarea: textPropsMap,

0 commit comments

Comments
 (0)