Skip to content

Commit 69936e5

Browse files
committed
fix(ComboBox): popover trigger logic
1 parent 571a033 commit 69936e5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/fields/ComboBox/ComboBox.docs.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ A combobox component that combines a text input with a dropdown list, allowing u
3737
**clearOnBlur** - When `true`, clears both the selection and input when the input loses focus. When `false` (default), the input reverts to showing the current selection. Only applies to non-custom-value mode. Useful for search-like scenarios where you want to reset after each interaction.
3838

3939
**popoverTrigger** - Controls how the popover opens:
40-
- `input` (default) - Opens when user types
41-
- `focus` - Opens when input receives focus
42-
- `manual` - Only opens via trigger button click
40+
- `manual` - Only opens via trigger button or arrow keys
41+
- `input` (default) - Opens when user types + manual triggers
42+
- `focus` - Opens on input focus + typing + manual triggers
4343

4444
**filter** - Custom filter function or `false` to disable filtering. By default, uses a contains-based filter. Provide a custom function `(textValue, inputValue) => boolean` to customize filtering logic.
4545

@@ -123,9 +123,9 @@ The `mods` property accepts the following modifiers you can override:
123123

124124
### Popover Trigger Modes
125125

126-
- `input` - Opens popover when user types (default)
127-
- `focus` - Opens popover when input receives focus
128-
- `manual` - Only opens via trigger button click
126+
- `manual` - Only opens via trigger button or arrow keys
127+
- `input` - Opens when user types + manual triggers (default)
128+
- `focus` - Opens on input focus + typing + manual triggers
129129

130130
<Story of={ComboBoxStories.PopoverTriggers} />
131131

src/components/fields/ComboBox/ComboBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ export const ComboBox = forwardRef(function ComboBox<T extends object>(
13291329
}
13301330

13311331
// Open popover based on trigger
1332-
if (popoverTrigger === 'input' && value && !isPopoverOpen) {
1332+
if (popoverTrigger !== 'manual' && value && !isPopoverOpen) {
13331333
setIsPopoverOpen(true);
13341334
}
13351335
},

0 commit comments

Comments
 (0)