Skip to content

Commit

Permalink
remove unused codeEditorDelay field, clear yamlStringCache on edit an…
Browse files Browse the repository at this point in the history
…d exit edity entry
  • Loading branch information
Nerwyn committed Sep 5, 2024
1 parent 15f2312 commit 0ef63f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/universal-remote-card.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/universal-remote-card-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export class UniversalRemoteCardEditor extends LitElement {
yamlString?: string;
yamlStringsCache: Record<string, string> = {};
autofillCooldown = false;
codeEditorDelay?: ReturnType<typeof setTimeout>;
people: Record<string, string>[] = [];

BASE_TABS = ['general', 'layout', 'actions', 'icons'];
Expand Down Expand Up @@ -325,9 +324,9 @@ export class UniversalRemoteCardEditor extends LitElement {
}

handleBaseTabSelected(e: CustomEvent) {
this.yamlStringsCache = {};
this.yamlString = undefined;
this.entryIndex = -1;
this.yamlStringsCache = {};
this.guiMode = true;
const i = e.detail.index;
if (this.baseTabIndex == i) {
Expand All @@ -337,8 +336,8 @@ export class UniversalRemoteCardEditor extends LitElement {
}

handleActionsTabSelected(e: CustomEvent) {
const i = e.detail.index;
this.yamlStringsCache = {};
const i = e.detail.index;
if (this.actionsTabIndex == i) {
return;
}
Expand Down Expand Up @@ -509,6 +508,7 @@ export class UniversalRemoteCardEditor extends LitElement {
}

editEntry(e: CustomEvent) {
this.yamlStringsCache = {};
this.yamlString = undefined;
const i = (
e.currentTarget as unknown as CustomEvent & Record<'index', number>
Expand All @@ -526,6 +526,7 @@ export class UniversalRemoteCardEditor extends LitElement {
}

exitEditEntry(_e: CustomEvent) {
this.yamlStringsCache = {};
this.yamlString = undefined;
this.entryIndex = -1;
}
Expand Down

0 comments on commit 0ef63f1

Please sign in to comment.