Skip to content

Commit

Permalink
revert to retriggering config changed on 100ms timeout for undefined …
Browse files Browse the repository at this point in the history
…value selector, remove default action from all ui action selectors
  • Loading branch information
Nerwyn committed Oct 15, 2024
1 parent 0fd5e0d commit 664d052
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/universal-remote-card.min.js

Large diffs are not rendered by default.

16 changes: 4 additions & 12 deletions src/universal-remote-card-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,10 @@ export class UniversalRemoteCardEditor extends LitElement {
break;
}
if (value == undefined) {
this.addEventListener(
'config-changed',
() => {
this.configChanged(this.config);
},
{ once: true },
);
// Fixes autofill issue where default value does not overwrite selector default undefined
setTimeout(() => {
this.configChanged(this.config);
}, 100);
}
}

Expand Down Expand Up @@ -1513,7 +1510,6 @@ export class UniversalRemoteCardEditor extends LitElement {
{
ui_action: {
actions: Actions,
default_action: 'none',
},
},
)}
Expand Down Expand Up @@ -1626,7 +1622,6 @@ export class UniversalRemoteCardEditor extends LitElement {
{
ui_action: {
actions: actionsNoRepeat,
default_action: 'perform-action',
},
},
true,
Expand All @@ -1651,7 +1646,6 @@ export class UniversalRemoteCardEditor extends LitElement {
const defaultUiActions = {
ui_action: {
actions: actionsNoRepeat,
default_action: 'none',
},
};
switch (this.actionsTabIndex) {
Expand Down Expand Up @@ -1697,7 +1691,6 @@ export class UniversalRemoteCardEditor extends LitElement {
{
ui_action: {
actions: Actions,
default_action: 'none',
},
},
)}
Expand Down Expand Up @@ -1727,7 +1720,6 @@ export class UniversalRemoteCardEditor extends LitElement {
{
ui_action: {
actions: Actions,
default_action: 'none',
},
},
)}
Expand Down

0 comments on commit 664d052

Please sign in to comment.