File tree Expand file tree Collapse file tree
components/dash-core-components/src/fragments Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments