Minor improvements to select

This commit is contained in:
Ronan Berder
2025-08-18 09:52:09 +08:00
parent 97a53f1a67
commit 29600bd3ac
5 changed files with 8 additions and 4 deletions
+1
View File
@@ -4089,6 +4089,7 @@
letter-spacing: var(--tracking-tight);
}
p {
word-break: break-all;
color: var(--color-muted-foreground);
}
}
+1 -1
View File
@@ -240,7 +240,7 @@ toc:
listbox_attrs={"class": "scrollbar overflow-y-auto max-h-64"}
) %}
{% for i in range(0, 99) %}
<div role="option" data-value="item-{{ i }}">Item {{ i }}</div>
<div role="option" {% if i > 0 %}data-value="item-{{ i }}"{% endif %}>Item {{ i }}</div>
{% endfor %}
{% endcall %}
{% endset %}
+1 -1
View File
@@ -47,7 +47,7 @@ toc:
config: {
category: 'success',
title: 'Success',
description: 'A success toast called from the front-end.',
description: 'Doain and words and things contains ..., expected devpush-verify=hostnull.com,3073994beb653d6a3436fbeaefab23fa.',
cancel: {
label: 'Dismiss'
}
+1 -1
View File
@@ -1005,7 +1005,7 @@
@apply font-medium tracking-tight;
}
p {
@apply text-muted-foreground;
@apply text-muted-foreground break-all;
}
}
footer {
+4 -1
View File
@@ -124,7 +124,10 @@
}
let initialOption = options.find(opt => opt.dataset.value === input.value);
if (!initialOption && options.length > 0) initialOption = options[0];
if (!initialOption) {
initialOption = options.find(opt => opt.dataset.value !== undefined) ?? options[0];
}
updateValue(initialOption, false);