diff options
| -rw-r--r-- | input/number.d.ts | 1 | ||||
| -rw-r--r-- | input/number.ts | 5 | ||||
| -rw-r--r-- | input/select.d.ts | 1 | ||||
| -rw-r--r-- | input/select.ts | 5 | ||||
| -rw-r--r-- | input/string.d.ts | 1 | ||||
| -rw-r--r-- | input/string.ts | 6 |
6 files changed, 18 insertions, 1 deletions
diff --git a/input/number.d.ts b/input/number.d.ts index 217e12c..29caeea 100644 --- a/input/number.d.ts +++ b/input/number.d.ts @@ -25,4 +25,5 @@ export declare class WuiInputNumber { private generateHint; private onClickHintToggler; private onKeyUp; + Set(v: number): void; } diff --git a/input/number.ts b/input/number.ts index 990d94a..9a2c514 100644 --- a/input/number.ts +++ b/input/number.ts @@ -194,4 +194,9 @@ export class WuiInputNumber { } return true } + + // Set the input value. + Set(v: number) { + this.el_input.value = ""+ v + } } diff --git a/input/select.d.ts b/input/select.d.ts index 4707838..4a5b9d7 100644 --- a/input/select.d.ts +++ b/input/select.d.ts @@ -32,4 +32,5 @@ export declare class WuiInputSelect { private generateHint; private onClickHintToggler; private onClickInput; + Set(v: string): void; } diff --git a/input/select.ts b/input/select.ts index 4882448..7fc42c5 100644 --- a/input/select.ts +++ b/input/select.ts @@ -185,4 +185,9 @@ export class WuiInputSelect { this.value = value } } + + // Set the input value. + Set(v: string) { + this.el_input.value = v + } } diff --git a/input/string.d.ts b/input/string.d.ts index 8159f66..0d585e5 100644 --- a/input/string.d.ts +++ b/input/string.d.ts @@ -22,4 +22,5 @@ export declare class WuiInputString { private generateHintToggler; private generateHint; private onClickHintToggler; + Set(v: string): void; } 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 + } } |
