mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-11 04:38:18 +00:00
Minor improvements to select
This commit is contained in:
@@ -4089,6 +4089,7 @@
|
||||
letter-spacing: var(--tracking-tight);
|
||||
}
|
||||
p {
|
||||
word-break: break-all;
|
||||
color: var(--color-muted-foreground);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
@@ -1005,7 +1005,7 @@
|
||||
@apply font-medium tracking-tight;
|
||||
}
|
||||
p {
|
||||
@apply text-muted-foreground;
|
||||
@apply text-muted-foreground break-all;
|
||||
}
|
||||
}
|
||||
footer {
|
||||
|
||||
+4
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user