Et2Select: Fix doubled tags, long tags missing ellipsis

This commit is contained in:
nathan 2023-04-18 10:36:34 -06:00
parent cefbf87dd4
commit fe962c2177
2 changed files with 12 additions and 8 deletions

View File

@ -83,14 +83,18 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
/* No horizontal scrollbar, even if options are long */
.dropdown__panel {
overflow-x: clip;
}
/* Ellipsis when too small */
.select__label {
}
/* Ellipsis when too small */
.select_tags {
max-width: 100%;
}
.select__label {
display: block;
text-overflow: ellipsis;
/* This is usually not used due to flex, but is the basis for ellipsis calculation */
width: 10ex;
}
text-overflow: ellipsis;
/* This is usually not used due to flex, but is the basis for ellipsis calculation */
width: 10ex;
}
/** multiple=true uses tags for each value **/
/* styling for icon inside tag (not option) */

View File

@ -779,7 +779,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
handleMenuSelect(event)
{
// Need to keep the remote option - only if selected
if(event.detail.item.classList.contains("remote") && !this._selected_remote.find(o => o.value == event.detail.item.value))
if(event.detail.item.classList.contains("remote") && !this.select_options.find(o => o.value == event.detail.item.value))
{
this._selected_remote.push({...event.detail.item.option});
}