({ mask, ...opts }: PasswordOptions)
| 29 | this._clearUserInput(); |
| 30 | } |
| 31 | constructor({ mask, ...opts }: PasswordOptions) { |
| 32 | super(opts); |
| 33 | this._mask = mask ?? '•'; |
| 34 | this.on('userInput', (input) => { |
| 35 | this._setValue(input); |
| 36 | }); |
| 37 | this.on('finalize', () => { |
| 38 | if (this.value === undefined) { |
| 39 | this.value = ''; |
| 40 | } |
| 41 | }); |
| 42 | } |
| 43 | } |