Skip to content

Commit 20dfa0f

Browse files
authored
Merge pull request #39 from glinda93/master
Add listOptionProps to props
2 parents 8bfb937 + 4e9d41e commit 20dfa0f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export default App
151151
| selectedItemStyle | style object | Default style |
152152
searchInputProps | object | Default props |
153153
multiSelectInputFieldProps | object | Default props |
154+
| listOptionProps | object | Default props |
154155
| arrowIconColor | color string | Default primary color |
155156
| searchIconColor | color string | Default primary color |
156157
| toggleIconColor | color string | Default primary color |

lib/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export default App
151151
| selectedItemStyle | style object | Default style |
152152
searchInputProps | object | Default props |
153153
multiSelectInputFieldProps | object | Default props |
154+
| listOptionProps | object | Default props |
154155
| arrowIconColor | color string | Default primary color |
155156
| searchIconColor | color string | Default primary color |
156157
| toggleIconColor | color string | Default primary color |

lib/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ function SelectBox({
142142
toggleIconColor = Colors.primary,
143143
searchInputProps,
144144
multiSelectInputFieldProps,
145+
listOptionProps = {},
145146
} = props
146147
const filteredSuggestions = useMemo(
147148
() => options.filter((suggestion) => suggestion.item.toLowerCase().indexOf(inputValue.toLowerCase()) > -1),
@@ -237,8 +238,9 @@ function SelectBox({
237238
maxToRenderPerBatch={20}
238239
windowSize={10}
239240
ListEmptyComponent={optionListEmpty}
240-
style={kOptionsHeight}
241+
style={[kOptionsHeight, listOptionProps.style]}
241242
ListHeaderComponent={HeaderComponent()}
243+
{...listOptionProps}
242244
/>
243245
)}
244246
</View>

0 commit comments

Comments
 (0)