@@ -90,14 +90,20 @@ class CompleteFlatList extends Component {
9090 renderEmptyRow = ( ) => < Text style = { styles . noData } > No data available</ Text > ;
9191
9292 render ( ) {
93- const { renderItem, renderSeparator, pullToRefreshCallback } = this . props ;
93+ const {
94+ renderItem,
95+ renderSeparator,
96+ pullToRefreshCallback,
97+ backgroundStyles,
98+ searchBarBackgroundStyles,
99+ } = this . props ;
94100 const filteredData = this . filterText ( ) ;
95101 if ( filteredData . length === 0 ) {
96102 filteredData . push ( { showEmptyRow : true } ) ;
97103 }
98104
99105 const searchbar = (
100- < View style = { styles . searchBarContainer } >
106+ < View style = { [ styles . searchBarContainer , searchBarBackgroundStyles ] } >
101107 < TextInput
102108 style = { styles . searchBar }
103109 placeholder = "Search ..."
@@ -127,7 +133,7 @@ class CompleteFlatList extends Component {
127133 return (
128134 < KeyboardAvoidingView
129135 behavior = { this . state . behavior }
130- style = { styles . container }
136+ style = { [ styles . container , backgroundStyles ] }
131137 >
132138 { this . props . searchKey . length > 0 && searchbar }
133139 < FlatList
@@ -156,6 +162,8 @@ CompleteFlatList.propTypes = {
156162 pullToRefreshCallback : PropTypes . func ,
157163 highlightColor : PropTypes . string ,
158164 isRefreshing : PropTypes . bool ,
165+ backgroundStyles : PropTypes . object ,
166+ searchBarBackgroundStyles : PropTypes . object ,
159167} ;
160168CompleteFlatList . defaultProps = {
161169 searchKey : [ ] ,
@@ -165,6 +173,8 @@ CompleteFlatList.defaultProps = {
165173 renderSeparator : ( ) => < View style = { styles . defaultSeparator } /> ,
166174 pullToRefreshCallback : null ,
167175 highlightColor : '' ,
176+ backgroundStyles : { } ,
177+ searchBarBackgroundStyles : { } ,
168178} ;
169179
170180const styles = StyleSheet . create ( {
0 commit comments