Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/dialogs/quick-bar/ha-quick-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class QuickBar extends LitElement {
private _focusSet = false;

public async showDialog(params: QuickBarParams) {
this._commandMode = params.commandMode || false;
this._commandMode = params.commandMode || this._toggleIfAlreadyOpened();
this._commandItems = this._generateCommandItems();
this._entityItems = this._generateEntityItems();
this._opened = true;
Expand Down Expand Up @@ -305,6 +305,10 @@ export class QuickBar extends LitElement {
.sort((a, b) => compare(a.text.toLowerCase(), b.text.toLowerCase()));
}

private _toggleIfAlreadyOpened() {
return this._opened ? !this._commandMode : false;
}

private _setFilteredItems() {
const items = this._commandMode ? this._commandItems : this._entityItems;
this._items = this._filter
Expand Down