diff --git a/docs/src/assets/styles.css b/docs/src/assets/styles.css
index 3b784da..ec436dc 100644
--- a/docs/src/assets/styles.css
+++ b/docs/src/assets/styles.css
@@ -4089,6 +4089,7 @@
letter-spacing: var(--tracking-tight);
}
p {
+ word-break: break-all;
color: var(--color-muted-foreground);
}
}
diff --git a/docs/src/components/select.njk b/docs/src/components/select.njk
index 7bbec76..8f84d1a 100644
--- a/docs/src/components/select.njk
+++ b/docs/src/components/select.njk
@@ -240,7 +240,7 @@ toc:
listbox_attrs={"class": "scrollbar overflow-y-auto max-h-64"}
) %}
{% for i in range(0, 99) %}
-
Item {{ i }}
+ 0 %}data-value="item-{{ i }}"{% endif %}>Item {{ i }}
{% endfor %}
{% endcall %}
{% endset %}
diff --git a/docs/src/components/toast.njk b/docs/src/components/toast.njk
index 31f9621..a9426fe 100644
--- a/docs/src/components/toast.njk
+++ b/docs/src/components/toast.njk
@@ -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'
}
diff --git a/src/css/basecoat.css b/src/css/basecoat.css
index 483934e..4800630 100644
--- a/src/css/basecoat.css
+++ b/src/css/basecoat.css
@@ -1005,7 +1005,7 @@
@apply font-medium tracking-tight;
}
p {
- @apply text-muted-foreground;
+ @apply text-muted-foreground break-all;
}
}
footer {
diff --git a/src/js/select.js b/src/js/select.js
index 28ce8a4..8e10dc8 100644
--- a/src/js/select.js
+++ b/src/js/select.js
@@ -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);