Use prop instead of state for searchText#1160
Conversation
|
I agree. Please look at the failing tests |
|
I suspect what's going on is that now that searchText is controlled by the global state and not by the component state, its value fails to update since action + reducer are not invoked in the test. Is this a possibility? |
|
Yes, it's possible, we probably need to think of a different set of tests |
mbarto
left a comment
There was a problem hiding this comment.
I think we miss proper actions and reducers to handle text change, isn't it?
|
Well the existing actions |
|
Oh, ok, so actions and reducers for text change already existed also if state was used for internal handling. Sorry about asking. I'll do a quick local test and merge. |
Perhaps I missed the reason for storing searchText in the component state,
but it would be convenient for us to have the searchText field in the global
redux state reflect the actual search text to correctly restore the search
text from the url via a
dispatch(searchTextChanged(text))inloadMapConfig.