From bf6e7d06afcd62b81b3aef9d9979746bde2fd037 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Fri, 22 Jan 2016 00:16:09 +0900 Subject: [PATCH] fix(validations): fix other wrong behaviors Related 2dcafeb --- src/validations/checkbox.js | 2 -- src/validations/radio.js | 3 --- src/validations/select.js | 1 - 3 files changed, 6 deletions(-) diff --git a/src/validations/checkbox.js b/src/validations/checkbox.js index e571e34..39b8726 100644 --- a/src/validations/checkbox.js +++ b/src/validations/checkbox.js @@ -45,7 +45,6 @@ export default class CheckboxValidation extends BaseValidation { this._setChecked(value, item.el) item.unwatch = scope.$watch(model, _.bind((val, old) => { if (val !== old) { - this._setChecked(val, item.el) this.handleValidate(item.el) } }, this)) @@ -56,7 +55,6 @@ export default class CheckboxValidation extends BaseValidation { item.value = el.value item.unwatch = scope.$watch(model, _.bind((val, old) => { if (val !== old) { - el.checked = val this.handleValidate(el) } }, this)) diff --git a/src/validations/radio.js b/src/validations/radio.js index 1e5743a..8266c17 100644 --- a/src/validations/radio.js +++ b/src/validations/radio.js @@ -44,9 +44,6 @@ export default class RadioValidation extends BaseValidation { this._setChecked(value, el, item) item.unwatch = scope.$watch(model, _.bind((val, old) => { if (val !== old) { - if (el.value === val) { - el.checked = val - } this.handleValidate(el) } }, this)) diff --git a/src/validations/select.js b/src/validations/select.js index 95666eb..5696fd8 100644 --- a/src/validations/select.js +++ b/src/validations/select.js @@ -53,7 +53,6 @@ export default class SelectValidation extends BaseValidation { let values1 = !Array.isArray(val) ? [val] : val let values2 = !Array.isArray(old) ? [old] : old if (values1.slice().sort().toString() !== values2.slice().sort().toString()) { - this._setOption(values1, el) this.handleValidate(el) } }, this))