Skip to content
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@danish1658/react-native-d
| save| string | Pass ('key' or 'value') to save data of your choice in your local state variable
| onSelect| Function | Pass any function that you want to trigger immediately after a value is selected
| placeholder | String | Placeholder text that will be displayed in the select box
| placeholderTextColor | String | Text color for the placeholder
| search | boolean | set to false if you dont want to use search functionality
| maxHeight| Number | Maximum height of the dropdown wrapper to occupy
| data| array or array[object]| Data which will be iterated as options of select list
Expand Down
2 changes: 2 additions & 0 deletions components/MultipleSelectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const MultipleSelectList: React.FC<MultipleSelectListProps> = ({
fontFamily,
setSelected,
placeholder,
placeholderTextColor,
boxStyles,
inputStyles,
dropdownStyles,
Expand Down Expand Up @@ -131,6 +132,7 @@ const MultipleSelectList: React.FC<MultipleSelectListProps> = ({

<TextInput
placeholder={searchPlaceholder}
placeholderTextColor={placeholderTextColor}
onChangeText={(val) => {
let result = data.filter((item: L1Keys) => {
val.toLowerCase();
Expand Down
2 changes: 2 additions & 0 deletions components/SelectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type L1Keys = { key?: any; value?: any; disabled?: boolean | undefined }
const SelectList: React.FC<SelectListProps> = ({
setSelected,
placeholder,
placeholderTextColor,
boxStyles,
inputStyles,
dropdownStyles,
Expand Down Expand Up @@ -137,6 +138,7 @@ const SelectList: React.FC<SelectListProps> = ({

<TextInput
placeholder={searchPlaceholder}
placeholderTextColor={placeholderTextColor}
onChangeText={(val) => {
let result = data.filter((item: L1Keys) => {
val.toLowerCase();
Expand Down
10 changes: 10 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export interface SelectListProps {
*/
placeholder?: string,

/**
* Placeholder text color that will style the placeholder of search text input
*/
placeholderTextColor?: string,

/**
* Additional styles for select box
*/
Expand Down Expand Up @@ -126,6 +131,11 @@ export interface MultipleSelectListProps {
*/
placeholder?: string,

/**
* Placeholder text color that will style the placeholder of search text input
*/
placeholderTextColor?: string,

/**
* Additional styles for select box
*/
Expand Down