mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Fix removal of option in select helper (#5777)
This commit is contained in:
parent
2d646da97f
commit
89f6f16ba2
@ -153,6 +153,7 @@ class HaInputSelectForm extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _removeOption(ev: Event) {
|
private async _removeOption(ev: Event) {
|
||||||
|
const index = (ev.target as any).index;
|
||||||
if (
|
if (
|
||||||
!(await showConfirmationDialog(this, {
|
!(await showConfirmationDialog(this, {
|
||||||
title: "Delete this item?",
|
title: "Delete this item?",
|
||||||
@ -161,7 +162,6 @@ class HaInputSelectForm extends LitElement {
|
|||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const index = (ev.target as any).index;
|
|
||||||
const options = [...this._options];
|
const options = [...this._options];
|
||||||
options.splice(index, 1);
|
options.splice(index, 1);
|
||||||
fireEvent(this, "value-changed", {
|
fireEvent(this, "value-changed", {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user