fix no category was selected (because of numeric value) and color was not shown

This commit is contained in:
ralf 2022-08-09 17:24:28 +02:00
parent cb63269598
commit 9ddfba4a24

View File

@ -11,6 +11,7 @@
import {css, PropertyValues} from "@lion/core";
import {Et2Select} from "./Et2Select";
import {Et2StaticSelectMixin, StaticOptions} from "./StaticOptions";
import {cleanSelectOptions} from "./FindSelectOptions";
/**
* Customised Select widget for categories
@ -59,7 +60,7 @@ export class Et2SelectCategory extends Et2StaticSelectMixin(Et2Select)
super();
so.cat(this).then(options =>
{
this.static_options = options
this.static_options = cleanSelectOptions(options);
this.requestUpdate("select_options");
});
}
@ -89,7 +90,7 @@ export class Et2SelectCategory extends Et2StaticSelectMixin(Et2Select)
{
super.updated(changedProperties);
if(changedProperties.has("value"))
if(changedProperties.has("value") || changedProperties.has('select_options'))
{
this.doLabelChange()
}