Remove old field-mount and field-change emitters and listeners.

Replace FormMixin with new functionality.
This commit is contained in:
leigh-mil
2019-11-13 15:59:43 -05:00
parent 3576551f42
commit bc0382834b
9 changed files with 21 additions and 176 deletions

View File

@@ -1,7 +1,6 @@
import MaskedInput, { conformToMask } from 'vue-text-mask'
import inputValidations from '../lib/input_validations'
import { formatDollars } from '../lib/dollars'
import { emitEvent } from '../lib/emitters'
export default {
name: 'textinput',
@@ -78,14 +77,6 @@ export default {
}
},
created: function() {
emitEvent('field-mount', this, {
optional: this.optional,
name: this.name,
valid: this._isValid(this.value),
})
},
methods: {
// When user types a character
onInput: function(e) {
@@ -144,12 +135,6 @@ export default {
value: this._rawValue(value),
name: this.name,
})
emitEvent('field-change', this, {
value: this._rawValue(value),
valid: this._isValid(value),
name: this.name,
watch: this.watch,
})
},
_rawValue: function(value) {