File tree Expand file tree Collapse file tree 5 files changed +6
-1
lines changed Expand file tree Collapse file tree 5 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,7 @@ yarn android
285285| ` direction ` | "up" or "down" | string | down + auto calculate |
286286| ` matchFrom ` | Whether match suggestions from start of titles or anywhere in the title. Possible values are "any" or "start" | string | any |
287287| ` bottomOffset ` | For calculate dropdown direction (e.g., tabbar) | number | 0 |
288+ | ` theme ` | Color scheme. Possible values are "light" or "dark" | string | OS's color scheme |
288289| ` onChangeText ` | Event textInput onChangeText | function | |
289290| ` onSelectItem ` | Event onSelectItem | function | |
290291| ` onOpenSuggestionsList ` | Event onOpenSuggestionsList | function | |
Original file line number Diff line number Diff line change @@ -239,6 +239,7 @@ npm run ios
239239| ` direction ` | "up" or "down" | string | down + auto calculate |
240240| ` position ` | "relative" or "absolute" | string | relative |
241241| ` bottomOffset ` | for calculate dropdown direction (e.g. tabbar) | number | 0 |
242+ | ` theme ` | Color scheme. Possible values are "light" or "dark" | string | OS's color scheme |
242243| ` onChangeText ` | event textInput onChangeText | function | |
243244| ` onSelectItem ` | event onSelectItem | function | |
244245| ` onOpenSuggestionsList ` | event onOpenSuggestionsList | function | |
Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ yarn ios
277277| ` direction ` | "up" or "down" | string | down + auto calculate |
278278| ` matchFrom ` | whether match suggestions from start of titles or anywhere in the title. Possible values are "any" or "start" | string | any |
279279| ` bottomOffset ` | for calculate dropdown direction (e.g. tabbar) | number | 0 |
280+ | ` theme ` | Color scheme. Possible values are "light" or "dark" | string | OS's color scheme |
280281| ` onChangeText ` | event textInput onChangeText | function | |
281282| ` onSelectItem ` | event onSelectItem | function | |
282283| ` onOpenSuggestionsList ` | event onOpenSuggestionsList | function | |
Original file line number Diff line number Diff line change @@ -18,9 +18,10 @@ export const Dropdown = memo((props: DropdownProps) => {
1818 ListEmptyComponent,
1919 ItemSeparatorComponent,
2020 direction,
21+ theme,
2122 ...rest
2223 } = props
23- const themeName = useColorScheme ( )
24+ const themeName = theme || useColorScheme ( )
2425 const styles = useMemo ( ( ) => getStyles ( themeName || 'light' ) , [ themeName ] )
2526
2627 const defaultItemSeparator = useMemo ( ( ) => {
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export interface IAutocompleteDropdownProps {
4646 position ?: 'absolute' | 'relative'
4747 bottomOffset ?: number
4848 textInputProps ?: TextInputProps
49+ theme ?: 'light' | 'dark'
4950 onChangeText ?: ( text : string ) => void
5051 onSelectItem ?: ( item : AutocompleteDropdownItem | null ) => void
5152 renderItem ?: ( item : AutocompleteDropdownItem , searchText : string ) => React . ReactElement | null
You can’t perform that action at this time.
0 commit comments