Skip to content
This repository has been archived by the owner on Dec 25, 2017. It is now read-only.

Commit

Permalink
fix(validations): fix other wrong behaviors
Browse files Browse the repository at this point in the history
Related 2dcafeb
  • Loading branch information
kazupon committed Jan 22, 2016
1 parent 2dcafeb commit bf6e7d0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/validations/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand Down
3 changes: 0 additions & 3 deletions src/validations/radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 0 additions & 1 deletion src/validations/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit bf6e7d0

Please sign in to comment.