minor fix on button event

This commit is contained in:
lxsang 2020-07-14 17:43:45 +02:00
parent 47a22559d8
commit 56ae39d020
2 changed files with 4 additions and 4 deletions

View File

@ -275,7 +275,7 @@ namespace OS {
export namespace dialogs { export namespace dialogs {
/** /**
* Simple prompt dialog to get user input text. * Simple prompt dialog to get user input text.
* The input date of the dialog: * The input data of the dialog:
* *
* ```typescript * ```typescript
* { * {

View File

@ -134,15 +134,15 @@ namespace OS {
*/ */
protected mount() { protected mount() {
$(this.refs.button).click((e) => { $(this.refs.button).click((e) => {
if (this.toggle) {
this.selected = !this.selected;
}
const evt: TagEventType<JQuery.MouseEventBase> = { const evt: TagEventType<JQuery.MouseEventBase> = {
id: this.aid, id: this.aid,
data: e, data: e,
}; };
this._onbtclick(evt); this._onbtclick(evt);
this.observable.trigger("btclick", evt); this.observable.trigger("btclick", evt);
if (this.toggle) {
return (this.selected = !this.selected);
}
}); });
} }