Fix doubled tags if widget gets select_options after a remote option is selected

This commit is contained in:
nathan 2022-12-08 14:28:05 -07:00
parent 05a4fc2758
commit ce64ddf9e0

View File

@ -502,6 +502,16 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
set select_options(options : SelectOption[])
{
super.select_options = options;
// Remove any selected remote, they're real options now
for(let remote_index = this._selected_remote.length - 1; remote_index >= 0; remote_index--)
{
let remote = this._selected_remote[remote_index];
if(options.findIndex(o => o.value == remote.value) != -1)
{
this._selected_remote.splice(remote_index, 1);
}
}
}
get value()