File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -162,10 +162,10 @@ export default function Dropdown2(props: DropdownProps) {
162162 } }
163163 onFocus = { ( event ) => event . target . select ( ) }
164164 className = "h-9 w-full text-sm border-gray-300 rounded-md placeholder-italic border text-gray-900 pr-8 pl-4 truncate placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 focus:ring-offset-gray-100 disabled:opacity-50 disabled:cursor-not-allowed"
165- disabled = { isDisabled }
165+ disabled = { isDisabled && ! props . ignoreDisabledForSearch }
166166 placeholder = "Type to search..." />
167167 < IconChevronDown
168- className = { `h-5 w-5 absolute right-0 mr-3 -mt-7 ${ isDisabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer' } ` }
168+ className = { `h-5 w-5 absolute right-0 mr-3 -mt-7 ${ isDisabled && ! props . ignoreDisabledForSearch ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer' } ` }
169169 aria-hidden = "true"
170170 />
171171 </ div > : < >
Original file line number Diff line number Diff line change 3939 * @useFillForIcons {boolean[], optional} - if true, the icon will be filled with the color of the option
4040 * @searchTextTyped {function} - returns the text typed in the search bar
4141 * @fontSizeClass {string} - The font size of the dropdown items
42+ * @ignoreDisabledForSearch {boolean} - If the search bar should ignore the disabled options
4243*/
4344export type DropdownProps = {
4445 buttonName ?: string ;
@@ -83,6 +84,7 @@ export type DropdownProps = {
8384 searchTextTyped ?: ( value : string ) => void ;
8485 fontSizeClass ?: string ;
8586 filteredOptions ?: ( option : string ) => void ;
87+ ignoreDisabledForSearch ?: boolean ;
8688}
8789
8890export type AppSelectionDropdownProps = {
You can’t perform that action at this time.
0 commit comments