Skip to content

Commit 189c971

Browse files
committed
Phenome: fix defaultValue overriding current value
1 parent 6e8b677 commit 189c971

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/phenome/components/input.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ export default {
7575
computed: {
7676
inputWithValue() {
7777
const self = this;
78-
const { value, defaultValue } = self.props;
78+
const { value } = self.props;
7979
const { currentInputValue } = self.state;
8080
return typeof value === 'undefined'
81-
? (defaultValue || defaultValue === 0 || currentInputValue)
81+
? (currentInputValue)
8282
: (value || value === 0);
8383
},
8484
},

src/phenome/components/list-input.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ export default {
330330
computed: {
331331
inputHasValue() {
332332
const self = this;
333-
const { value, defaultValue } = self.props;
333+
const { value } = self.props;
334334
const { currentInputValue } = self.state;
335335
return typeof value === 'undefined'
336-
? (defaultValue || defaultValue === 0 || currentInputValue)
336+
? (currentInputValue)
337337
: (value || value === 0);
338338
},
339339
},

0 commit comments

Comments
 (0)