Show title for cut off select item entries

This commit is contained in:
space-nuko
2023-05-27 23:43:28 -05:00
parent 3b9d4533f9
commit c255e5b425
2 changed files with 14 additions and 2 deletions

View File

@@ -129,10 +129,21 @@
};
}
function getTitle(value?: string) {
if (value == null) {
if (!nodeValue)
return ""
value = $nodeValue
}
if (value && value.length > 80)
return String(value)
return ""
}
</script>
<div class="wrapper comfy-combo" class:mobile={isMobile} class:updated={$lightUp}>
<label>
<label title={getTitle()}>
{#if widget.attrs.title !== ""}
<BlockTitle show_label={true}>
{widget.attrs.title}
@@ -175,6 +186,7 @@
class:mobile={isMobile}
let:index={i}
let:style
title={getTitle(filteredItems[i].label)}
{style}
class:active={activeIndex === filteredItems[i].index}
class:hover={hoverItemIndex === i}