Skip to content

Commit

Permalink
Merge pull request #39 from glinda93/master
Browse files Browse the repository at this point in the history
Add listOptionProps to props
  • Loading branch information
sauzy34 authored Apr 20, 2021
2 parents 8bfb937 + 4e9d41e commit 20dfa0f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export default App
| selectedItemStyle | style object | Default style |
searchInputProps | object | Default props |
multiSelectInputFieldProps | object | Default props |
| listOptionProps | object | Default props |
| arrowIconColor | color string | Default primary color |
| searchIconColor | color string | Default primary color |
| toggleIconColor | color string | Default primary color |
Expand Down
1 change: 1 addition & 0 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export default App
| selectedItemStyle | style object | Default style |
searchInputProps | object | Default props |
multiSelectInputFieldProps | object | Default props |
| listOptionProps | object | Default props |
| arrowIconColor | color string | Default primary color |
| searchIconColor | color string | Default primary color |
| toggleIconColor | color string | Default primary color |
Expand Down
4 changes: 3 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function SelectBox({
toggleIconColor = Colors.primary,
searchInputProps,
multiSelectInputFieldProps,
listOptionProps = {},
} = props
const filteredSuggestions = useMemo(
() => options.filter((suggestion) => suggestion.item.toLowerCase().indexOf(inputValue.toLowerCase()) > -1),
Expand Down Expand Up @@ -237,8 +238,9 @@ function SelectBox({
maxToRenderPerBatch={20}
windowSize={10}
ListEmptyComponent={optionListEmpty}
style={kOptionsHeight}
style={[kOptionsHeight, listOptionProps.style]}
ListHeaderComponent={HeaderComponent()}
{...listOptionProps}
/>
)}
</View>
Expand Down

0 comments on commit 20dfa0f

Please sign in to comment.