| | |
| | | }; |
| | | this.observers = { |
| | | value(val) { |
| | | this.updateCount(val); |
| | | this.updateCount(val !== null && val !== void 0 ? val : this.properties.defaultValue); |
| | | }, |
| | | }; |
| | | this.lifetimes = { |
| | | ready() { |
| | | const { value } = this.properties; |
| | | this.updateValue(value == null ? '' : value); |
| | | var _a; |
| | | const { value, defaultValue } = this.properties; |
| | | this.updateValue((_a = value !== null && value !== void 0 ? value : defaultValue) !== null && _a !== void 0 ? _a : ''); |
| | | }, |
| | | }; |
| | | this.methods = { |
| | |
| | | }; |
| | | }, |
| | | onInput(event) { |
| | | const { value } = event.detail; |
| | | const { value, cursor } = event.detail; |
| | | this.updateValue(value); |
| | | this.triggerEvent('change', { value: this.data.value }); |
| | | this.triggerEvent('change', { value: this.data.value, cursor }); |
| | | }, |
| | | onFocus(event) { |
| | | this.triggerEvent('focus', Object.assign({}, event.detail)); |