@@ -13,7 +13,6 @@ export enum DropdownOptionType {
1313 SEPARATOR = "separator" ,
1414 SHORTCUT = "shortcut" ,
1515 ACTION = "action" ,
16- COMPONENT = "component" ,
1716}
1817
1918export interface DropdownOption {
@@ -22,7 +21,6 @@ export interface DropdownOption {
2221 disabled ?: boolean
2322 type ?: DropdownOptionType
2423 pinned ?: boolean
25- component ?: React . ReactNode
2624}
2725
2826export interface SelectDropdownProps {
@@ -104,10 +102,7 @@ export const SelectDropdown = React.memo(
104102 return options
105103 . filter (
106104 ( option ) =>
107- option . type !== DropdownOptionType . SEPARATOR &&
108- option . type !== DropdownOptionType . SHORTCUT &&
109- // Only include COMPONENT type if it has a label or value to search by
110- ! ( option . type === DropdownOptionType . COMPONENT && ! option . label && ! option . value ) ,
105+ option . type !== DropdownOptionType . SEPARATOR && option . type !== DropdownOptionType . SHORTCUT ,
111106 )
112107 . map ( ( option ) => ( {
113108 original : option ,
@@ -130,13 +125,9 @@ export const SelectDropdown = React.memo(
130125 // Get fuzzy matching items - only perform search if we have a search value
131126 const matchingItems = fzfInstance . find ( searchValue ) . map ( ( result ) => result . item . original )
132127
133- // Always include separators, shortcuts, and components without searchable text
128+ // Always include separators and shortcuts
134129 return options . filter ( ( option ) => {
135- if (
136- option . type === DropdownOptionType . SEPARATOR ||
137- option . type === DropdownOptionType . SHORTCUT ||
138- ( option . type === DropdownOptionType . COMPONENT && ! option . label && ! option . value )
139- ) {
130+ if ( option . type === DropdownOptionType . SEPARATOR || option . type === DropdownOptionType . SHORTCUT ) {
140131 return true
141132 }
142133
@@ -272,27 +263,6 @@ export const SelectDropdown = React.memo(
272263 )
273264 }
274265
275- if ( option . type === DropdownOptionType . COMPONENT && option . component ) {
276- return (
277- < div
278- key = { `component-${ index } ` }
279- onClick = { ( ) => ! option . disabled && handleSelect ( option . value ) }
280- className = { cn (
281- "px-3 py-1.5 text-sm cursor-pointer" ,
282- option . disabled
283- ? "opacity-50 cursor-not-allowed"
284- : "hover:bg-vscode-list-hoverBackground" ,
285- option . value === value
286- ? "bg-vscode-list-activeSelectionBackground text-vscode-list-activeSelectionForeground"
287- : "" ,
288- itemClassName ,
289- ) }
290- data-testid = "dropdown-component-item" >
291- { option . component }
292- </ div >
293- )
294- }
295-
296266 // Use stable keys for better reconciliation
297267 const itemKey = `item-${ option . value || option . label || index } `
298268
0 commit comments