From 3cbee0ca93230aa0bc215d23ecf66d235f257624 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 24 Aug 2026 11:40:43 +0100 Subject: [PATCH 1/6] remove unused `createOption` method Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0146FsnrtqFd6RhsnrEDf7Fy --- resources/js/components/inputs/relationship/SelectField.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/resources/js/components/inputs/relationship/SelectField.vue b/resources/js/components/inputs/relationship/SelectField.vue index 628d716ae12..6f84d3d479e 100644 --- a/resources/js/components/inputs/relationship/SelectField.vue +++ b/resources/js/components/inputs/relationship/SelectField.vue @@ -191,11 +191,6 @@ export default { this.$emit('input', items); }, - - createOption(value) { - const existing = this.options.find((option) => option.title === value); - return existing || { id: value, title: value }; - }, }, }; From 25a9abc59cc910f5be2cd222f31358338eb1d791 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 24 Aug 2026 11:40:57 +0100 Subject: [PATCH 2/6] skip the combobox trigger in the tab order when the search input is visible The trigger and the input were both tabbable, so it took two presses of the tab key to reach the input. The search query now only resets when the dropdown closes, so a keystroke that opens the dropdown is not wiped. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0146FsnrtqFd6RhsnrEDf7Fy --- resources/js/components/ui/Combobox/Combobox.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/js/components/ui/Combobox/Combobox.vue b/resources/js/components/ui/Combobox/Combobox.vue index 67684f59fd9..f9666e6958a 100644 --- a/resources/js/components/ui/Combobox/Combobox.vue +++ b/resources/js/components/ui/Combobox/Combobox.vue @@ -147,7 +147,9 @@ const triggerRef = useTemplateRef('trigger'); const searchInputRef = useTemplateRef('search'); watch(searchQuery, (value) => emit('search', value, () => {})); -watch(dropdownOpen, () => searchQuery.value = ''); +watch(dropdownOpen, (open) => { + if (!open) searchQuery.value = ''; +}); const getOptionLabel = (option) => { const label = option?.[props.optionLabel]; @@ -390,7 +392,7 @@ defineExpose({ Date: Mon, 24 Aug 2026 11:41:33 +0100 Subject: [PATCH 3/6] show the typed value as an add option and respect the highlighted option on enter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the typed value only appeared as an option when nothing matched, and pressing enter always committed the raw typed text — even after arrowing to an option in the list. The typed value now always shows as an `Add "..."` option at the top of the list, and enter selects whichever option is highlighted. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0146FsnrtqFd6RhsnrEDf7Fy --- .../fieldtypes/FormattingLocalesFieldtype.vue | 5 +- .../inputs/relationship/SelectField.vue | 5 +- .../js/components/ui/Combobox/Combobox.vue | 56 +++++++----- resources/js/stories/Combobox.stories.ts | 88 +++++++++++++++++++ 4 files changed, 130 insertions(+), 24 deletions(-) diff --git a/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue b/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue index d2b77f2f279..ef038c9b35b 100644 --- a/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue +++ b/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue @@ -18,8 +18,9 @@ -