Skip to content

Commit 2eed55a

Browse files
jasonvargaclaude
andcommitted
honor explicit close-on-select=false on single-select comboboxes
Previously shouldCloseOnSelect used `||`, so an explicit :close-on-select="false" on a single-select combobox was treated as unset and fell back to "close on select". Switch to `??` so an explicit false (or true) is always respected, and only an unset prop defers to the multi-aware default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5c7f2b4 commit 2eed55a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

resources/js/components/ui/Combobox/Combobox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const limitIndicatorColor = computed(() => {
202202
});
203203
204204
const canClearSelection = computed(() => props.clearable && props.modelValue);
205-
const shouldCloseOnSelect = computed(() => props.closeOnSelect || !props.multiple);
205+
const shouldCloseOnSelect = computed(() => props.closeOnSelect ?? !props.multiple);
206206
const shouldShowOptionsChevron = computed(() => props.options.length > 0 || props.ignoreFilter);
207207
const shouldShowLimitIndicator = computed(() => props.multiple && props.maxSelections && props.maxSelections !== Infinity);
208208

0 commit comments

Comments
 (0)