Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/Dropdown2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ export default function Dropdown2(props: DropdownProps) {
}}
onFocus={(event) => event.target.select()}
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"
disabled={isDisabled}
disabled={isDisabled && !props.ignoreDisabledForSearch}
placeholder="Type to search..." />
<IconChevronDown
className={`h-5 w-5 absolute right-0 mr-3 -mt-7 ${isDisabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'}`}
className={`h-5 w-5 absolute right-0 mr-3 -mt-7 ${isDisabled && !props.ignoreDisabledForSearch ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'}`}
aria-hidden="true"
/>
</div> : <>
Expand Down
2 changes: 2 additions & 0 deletions types/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* @useFillForIcons {boolean[], optional} - if true, the icon will be filled with the color of the option
* @searchTextTyped {function} - returns the text typed in the search bar
* @fontSizeClass {string} - The font size of the dropdown items
* @ignoreDisabledForSearch {boolean} - If the search bar should ignore the disabled options
*/
export type DropdownProps = {
buttonName?: string;
Expand Down Expand Up @@ -83,6 +84,7 @@ export type DropdownProps = {
searchTextTyped?: (value: string) => void;
fontSizeClass?: string;
filteredOptions?: (option: string) => void;
ignoreDisabledForSearch?: boolean;
}

export type AppSelectionDropdownProps = {
Expand Down