mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-10 19:40:25 +00:00
Add more info alarm control panel (#15893)
* Add more info alarm control panel * Improve buttons sizes * Add triggered, arming and pending state * Add keypad * Improve alarm code dialog * Fix code condition * Clean code * Fix mode selection with code * Use nothing
This commit is contained in:
@@ -100,10 +100,11 @@ export class HaControlSelect extends LitElement {
|
||||
|
||||
private _handleKeydown(ev: KeyboardEvent) {
|
||||
if (!this.options || this._activeIndex == null || this.disabled) return;
|
||||
const value = this.options[this._activeIndex].value;
|
||||
switch (ev.key) {
|
||||
case " ":
|
||||
this.value = this.options[this._activeIndex].value;
|
||||
fireEvent(this, "value-changed", { value: this.value });
|
||||
this.value = value;
|
||||
fireEvent(this, "value-changed", { value });
|
||||
break;
|
||||
case "ArrowUp":
|
||||
case "ArrowLeft":
|
||||
@@ -132,7 +133,7 @@ export class HaControlSelect extends LitElement {
|
||||
if (this.disabled) return;
|
||||
const value = (ev.target as any).value;
|
||||
this.value = value;
|
||||
fireEvent(this, "value-changed", { value: this.value });
|
||||
fireEvent(this, "value-changed", { value });
|
||||
}
|
||||
|
||||
private _handleOptionMouseDown(ev: MouseEvent) {
|
||||
|
||||
Reference in New Issue
Block a user