Fix issue in which default query runs instead of entered query (#1616)

Verified to work in the following scenarios:
- Saved query loaded and run
- Saved query loaded, edited, and run
- New query edited and run

Closes #1611
This commit is contained in:
Zachary Wasserman 2017-11-15 11:20:42 -08:00 committed by GitHub
parent d472d7d4bd
commit 923e4e1f08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1,3 +1,5 @@
* Fixed bug in which default query was run instead of entered query.
* Added pagination to the Host browser pages for increased performance.
* Fixed bug rendering hosts when clock speed cannot be parsed.

View file

@ -98,11 +98,9 @@ export class QueryPage extends Component {
}
componentWillReceiveProps (nextProps) {
const { dispatch, location, query, selectedHosts, selectedTargets } = nextProps;
const { dispatch, location, selectedHosts, selectedTargets } = nextProps;
const nextPathname = location.pathname;
const { pathname } = this.props.location;
const { query: queryText } = query;
this.setState({ queryText });
if (nextPathname !== pathname) {
this.resetCampaignAndTargets();