Skip to content

Commit 8cc3785

Browse files
committed
Combobox: Truncate selected option label when it's really long
Otherwise, it ends up on two lines and looks gorpy. You can still see the full label by opening the combobox.
1 parent ce0b7ee commit 8cc3785

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

resources/js/components/ui/Combobox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,11 @@ defineExpose({
277277
@blur="pushTaggableOption"
278278
/>
279279
280-
<button type="button" class="flex-1 text-start" v-else-if="!searchable && (dropdownOpen || !modelValue)">
280+
<button type="button" class="flex-1 text-start truncate" v-else-if="!searchable && (dropdownOpen || !modelValue)">
281281
<span class="text-gray-400 dark:text-gray-500 placeholder-text-xs" v-text="placeholder" />
282282
</button>
283283
284-
<button type="button" v-else class="flex-1 text-start cursor-pointer">
284+
<button type="button" v-else class="flex-1 text-start cursor-pointer truncate">
285285
<slot name="selected-option" v-bind="{ option: selectedOption }">
286286
<span v-if="labelHtml" v-html="getOptionLabel(selectedOption)" />
287287
<span v-else v-text="getOptionLabel(selectedOption)" />

0 commit comments

Comments
 (0)