@@ -19,7 +19,7 @@ const defaultTheme = {
19
19
} ;
20
20
21
21
function mapToAutowhateverTheme ( theme ) {
22
- var result = { } ;
22
+ let result = { } ;
23
23
24
24
for ( const key in theme ) {
25
25
switch ( key ) {
@@ -90,7 +90,7 @@ export default class AutosuggestContainer extends Component {
90
90
id : '1'
91
91
} ;
92
92
93
- constructor ( props ) {
93
+ constructor ( ) {
94
94
super ( ) ;
95
95
96
96
const initialState = {
@@ -103,7 +103,6 @@ export default class AutosuggestContainer extends Component {
103
103
} ;
104
104
105
105
this . store = createStore ( reducer , initialState ) ;
106
- this . theme = mapToAutowhateverTheme ( props . theme ) ;
107
106
108
107
this . saveInput = this . saveInput . bind ( this ) ;
109
108
}
@@ -117,7 +116,7 @@ export default class AutosuggestContainer extends Component {
117
116
multiSection, shouldRenderSuggestions, suggestions,
118
117
onSuggestionsUpdateRequested, getSuggestionValue, renderSuggestion,
119
118
renderSectionTitle, getSectionSuggestions, inputProps,
120
- onSuggestionSelected, focusInputOnSuggestionClick, id
119
+ onSuggestionSelected, focusInputOnSuggestionClick, theme , id
121
120
} = this . props ;
122
121
123
122
return (
@@ -133,7 +132,7 @@ export default class AutosuggestContainer extends Component {
133
132
inputProps = { inputProps }
134
133
onSuggestionSelected = { onSuggestionSelected }
135
134
focusInputOnSuggestionClick = { focusInputOnSuggestionClick }
136
- theme = { this . theme }
135
+ theme = { mapToAutowhateverTheme ( theme ) }
137
136
id = { id }
138
137
inputRef = { this . saveInput } />
139
138
</ Provider >
0 commit comments