Skip to content

Commit

Permalink
Merge pull request #1374 from MetaPhase-Consulting/fix/search-bar-pos…
Browse files Browse the repository at this point in the history
…ition-manager

search text does not persist when changing pages
  • Loading branch information
SidelineCory24 committed Feb 23, 2021
2 parents 4c04975 + 0d8c678 commit 4dc9aa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ const PositionManager = props => {
submitSearch={submitSearch}
onChange={setTextInputThrottled}
ref={childRef}
textSearch={textSearch}
/>
<div className="filterby-container">
<div className="filterby-label">Filter by:</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PositionManagerSearch = forwardRef((props, ref) => {
<legend className="usa-grid-full homepage-search-legend">Search for a position</legend>
<SearchBar
id="bureau-search-keyword-field"
defaultValue={props.defaultValue}
defaultValue={props.textSearch || props.defaultValue}
label="Keywords"
labelSrOnly
noButton
Expand Down Expand Up @@ -69,12 +69,14 @@ PositionManagerSearch.propTypes = {
submitSearch: PropTypes.func,
onChange: PropTypes.func,
defaultValue: PropTypes.string,
textSearch: PropTypes.string,
};

PositionManagerSearch.defaultProps = {
submitSearch: EMPTY_FUNCTION,
onChange: EMPTY_FUNCTION,
defaultValue: '',
textSearch: '',
};

export default PositionManagerSearch;

0 comments on commit 4dc9aa8

Please sign in to comment.