Skip to content

Add input search placeholder text color #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ yarn add react-native-element-dropdown
| search | Boolean | No | Show or hide input search |
| searchQuery | (keyword: string, labelValue: string) => Boolean| No | Callback used to filter the list of items |
| inputSearchStyle | ViewStyle | No | Styling for input search |
| searchPlaceholderTextColor | String | No | Search placeholder color |
| searchPlaceholder | String | No | The string that will be rendered before text input has been entered |
| renderInputSearch | (onSearch: (text:string) => void) => JSX.Element| No | Customize TextInput search |
| disable | Boolean | No | Specifies the disabled state of the Dropdown |
Expand Down Expand Up @@ -120,6 +121,7 @@ yarn add react-native-element-dropdown
| search | Boolean | No | Show or hide input search |
| searchQuery | (keyword: string, labelValue: string) => Boolean | No | Callback used to filter the list of items |
| inputSearchStyle | ViewStyle | No | Styling for input search |
| searchPlaceholderTextColor | String | No | Search placeholder color |
| searchPlaceholder | String | No | The string that will be rendered before text input has been entered |
| renderInputSearch | (onSearch: (text:string) => void) => JSX.Element | No | Customize TextInput search |
| disable | Boolean | No | Specifies the disabled state of the Dropdown |
Expand Down
4 changes: 3 additions & 1 deletion src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const DropdownComponent: <T>(
activeColor = '#F6F7F8',
fontFamily,
iconColor = 'gray',
searchPlaceholderTextColor = 'gray',
searchPlaceholder,
placeholder = 'Select item',
search = false,
Expand Down Expand Up @@ -488,7 +489,7 @@ const DropdownComponent: <T>(
}
onSearch(e);
}}
placeholderTextColor="gray"
placeholderTextColor={searchPlaceholderTextColor}
iconStyle={[{ tintColor: iconColor }, iconStyle]}
/>
);
Expand All @@ -499,6 +500,7 @@ const DropdownComponent: <T>(
accessibilityLabel,
font,
iconColor,
searchPlaceholderTextColor,
iconStyle,
inputSearchStyle,
onChangeText,
Expand Down
1 change: 1 addition & 0 deletions src/components/Dropdown/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface DropdownProps<T> {
minHeight?: number;
fontFamily?: string;
iconColor?: string;
searchPlaceholderTextColor?: string;
activeColor?: string;
data: T[];
value?: T | string | null | undefined;
Expand Down
4 changes: 3 additions & 1 deletion src/components/MultiSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const MultiSelectComponent: <T>(
fontFamily,
placeholderStyle,
iconColor = 'gray',
searchPlaceholderTextColor = 'gray',
inputSearchStyle,
searchPlaceholder,
placeholder = 'Select item',
Expand Down Expand Up @@ -487,7 +488,7 @@ const MultiSelectComponent: <T>(
}
onSearch(e);
}}
placeholderTextColor="gray"
placeholderTextColor={searchPlaceholderTextColor}
iconStyle={[{ tintColor: iconColor }, iconStyle]}
/>
);
Expand All @@ -498,6 +499,7 @@ const MultiSelectComponent: <T>(
accessibilityLabel,
font,
iconColor,
searchPlaceholderTextColor,
iconStyle,
inputSearchStyle,
onChangeText,
Expand Down
1 change: 1 addition & 0 deletions src/components/MultiSelect/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface MultiSelectProps<T> {
maxSelect?: number;
fontFamily?: string;
iconColor?: string;
searchPlaceholderTextColor?: string;
activeColor?: string;
data: T[];
value?: string[] | null | undefined;
Expand Down