Skip to content

Commit

Permalink
Fix event name for state change (#184)
Browse files Browse the repository at this point in the history
* Fix event name for state change

Fix a typo for the event name "state-changed"

* Hide "false" string at rendermessage

Hide "false" string in the dialog when showClose is false at rendermessage
  • Loading branch information
Stmu authored Jan 16, 2023
1 parent 7dfd9c2 commit a7f59ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/ble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class ImprovBluetoothLE extends EventTarget {
const state = encodedState.getUint8(0) as ImprovCurrentState;
this.logger.debug("improv current state", state);
this.currentState = state;
this.dispatchEvent(new CustomEvent("state-change"));
this.dispatchEvent(new CustomEvent("state-changed"));
}

private _handleImprovErrorStateChange(encodedState: DataView) {
Expand Down
16 changes: 8 additions & 8 deletions src/provision-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ class ProvisionDialog extends LitElement {
<div class="icon">${icon}</div>
${label}
</div>
${showClose &&
html`
<ib-button
slot="primaryAction"
dialogAction="ok"
label="Close"
></ib-button>
`}
${showClose ?
html`
<ib-button
slot="primaryAction"
dialogAction="ok"
label="Close"
></ib-button>
` : ``}
`;
}

Expand Down

0 comments on commit a7f59ca

Please sign in to comment.