-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.