Skip to content

Commit 55c8f65

Browse files
committed
Merge pull request #26 from jfremy/patch-1
Fix setValue incorrectly assuming there is a change when there is none
2 parents 8acc158 + f647cad commit 55c8f65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/Select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default class Select2 extends Component {
6767
}
6868

6969
setValue(value) {
70-
const elVal = this.el.val();
70+
const elVal = this.props.multiple ? this.el.val() || [] : this.el.val();
7171
if (!shallowEqualFuzzy(elVal, value)) {
7272
this.el.val(value).trigger('change');
7373
}

0 commit comments

Comments
 (0)