diff options
| author | Shulhan <ms@kilabit.info> | 2021-09-18 13:09:25 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-09-18 13:09:25 +0700 |
| commit | 779867def15468b542f5f3dc20b991fcfb241a19 (patch) | |
| tree | e313f37d61889022288f996dcb0d4a66172f9d7b /input/string.ts | |
| parent | b20668b0630708c866c55332e103bb0f158f8735 (diff) | |
| download | pakakeh.ts-779867def15468b542f5f3dc20b991fcfb241a19.tar.xz | |
input: add method to set the input value
The input number, select, and string now have method Set to set the
current value.
Diffstat (limited to 'input/string.ts')
| -rw-r--r-- | input/string.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/input/string.ts b/input/string.ts index 1faa3cb..84e7539 100644 --- a/input/string.ts +++ b/input/string.ts @@ -104,7 +104,6 @@ export class WuiInputString { } if (this.opts.onChangeHandler) { - console.log("register onchange") this.el_input.onkeyup = (ev: Event) => { if (this.opts.onChangeHandler) { if ( @@ -158,4 +157,9 @@ export class WuiInputString { this.el_hint.style.display = "none" } } + + // Set the input value. + Set(v: string) { + this.el_input.value = v + } } |
