Skip to content

Commit 85c386a

Browse files
alejandromumozzacharo
authored andcommitted
components: fix SearchBar text missing on input
- Fixed an issue where a search bar's filter text was being cleared after submitting a query.
1 parent 9274d99 commit 85c386a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/components/SearchBar/SearchBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ SearchBar.defaultProps = {
103103
// NOTE: Adding the key prop, will recreate the SearchBar in order to update
104104
// state with the latest redux queryString value.
105105
// https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#recommendation-fully-uncontrolled-component-with-a-key
106-
const SearchBarUncontrolled = ({ queryString, ...props }) => (
107-
<SearchBar key={queryString} {...props} />
106+
const SearchBarUncontrolled = ( props ) => (
107+
<SearchBar key={props.queryString} {...props} />
108108
);
109109

110110
SearchBarUncontrolled.propTypes = {

0 commit comments

Comments
 (0)