Skip to content

Commit 83fe8c9

Browse files
committed
Attempt to minimize changes
1 parent 8b3b4a3 commit 83fe8c9

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

components/dash-core-components/src/fragments/Dropdown.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,25 +282,21 @@ const Dropdown = (props: DropdownProps) => {
282282
(e: React.KeyboardEvent) => {
283283
// Handle TAB to select first option and close dropdown
284284
if (e.key === 'Tab' && !e.shiftKey) {
285-
// If we have filtered options and search is active, select the first one
286285
if (displayOptions.length > 0) {
287286
const firstOption = displayOptions[0];
288287
if (!firstOption.disabled) {
289288
if (multi) {
290-
// For multi-select, toggle the first option if not already selected
291289
if (!sanitizedValues.includes(firstOption.value)) {
292290
updateSelection([
293291
...sanitizedValues,
294292
firstOption.value,
295293
]);
296294
}
297295
} else {
298-
// For single-select, select the first option
299296
updateSelection([firstOption.value]);
300297
}
301298
}
302299
}
303-
// Close dropdown and let TAB naturally move focus
304300
setIsOpen(false);
305301
setProps({search_value: undefined});
306302
return;

0 commit comments

Comments
 (0)