From 15b219f8827cfb8bea87e120415df07fe8e06675 Mon Sep 17 00:00:00 2001 From: glinda93 <72871001+glinda93@users.noreply.github.com> Date: Sat, 10 Apr 2021 02:40:26 +0800 Subject: [PATCH 1/3] Add listOptionProps --- lib/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 2a1e25e..18e0a10 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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), @@ -237,8 +238,9 @@ function SelectBox({ maxToRenderPerBatch={20} windowSize={10} ListEmptyComponent={optionListEmpty} - style={kOptionsHeight} + style={[kOptionsHeight, listOptionProps.style]} ListHeaderComponent={HeaderComponent()} + {...listOptionProps} /> )} From 86bfc22647f316c8ed4ad57fc4a5cb119f33ecdc Mon Sep 17 00:00:00 2001 From: glinda93 <72871001+glinda93@users.noreply.github.com> Date: Sat, 10 Apr 2021 02:56:57 +0800 Subject: [PATCH 2/3] Add listOptionProps --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b7dd3c3..aa82fbf 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,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 | From 4e9d41ec6dfc6cbbe2c9c7207bd85342cafa0713 Mon Sep 17 00:00:00 2001 From: glinda93 Date: Mon, 19 Apr 2021 08:29:09 +0800 Subject: [PATCH 3/3] Add listOptionProps to lib/README.md --- lib/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/README.md b/lib/README.md index b7dd3c3..aa82fbf 100644 --- a/lib/README.md +++ b/lib/README.md @@ -150,6 +150,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 |