diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 01:07:11 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 01:07:11 +0100 |
commit | b7fab958633456346d67c9cdd68eef05572882ab (patch) | |
tree | 5f2911bbfd1445e7d8ff9a285ec1ac441806967d /src/client/react/components | |
parent | 4ce420528dd747021f7fa51483710388f5733724 (diff) |
Add redux devtools support
Diffstat (limited to 'src/client/react/components')
-rw-r--r-- | src/client/react/components/container/Search.js | 1 | ||||
-rw-r--r-- | src/client/react/components/presentational/Search.js | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/client/react/components/container/Search.js b/src/client/react/components/container/Search.js index 1b5a41d..0722128 100644 --- a/src/client/react/components/container/Search.js +++ b/src/client/react/components/container/Search.js @@ -4,6 +4,7 @@ import PresentationalSearch from '../presentational/Search'; const mapStateToProps = state => ({ results: state.searchResults, + value: state.searchInput, }); const mapDispatchToProps = dispatch => ({ diff --git a/src/client/react/components/presentational/Search.js b/src/client/react/components/presentational/Search.js index ce4a09d..f75e612 100644 --- a/src/client/react/components/presentational/Search.js +++ b/src/client/react/components/presentational/Search.js @@ -1,10 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; -const Search = ({ onType, results }) => ( +const Search = ({ onType, value, results }) => ( <div> <input onChange={onType} + value={value} placeholder="Zoeken" /> <ul> @@ -15,6 +16,7 @@ const Search = ({ onType, results }) => ( Search.propTypes = { onType: PropTypes.func.isRequired, + value: PropTypes.func.isRequired, results: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string.require, type: PropTypes.string.require, |