Skip to content

Commit

Permalink
Merge pull request #1489 from HubSpot/task_search
Browse files Browse the repository at this point in the history
Fix Task Search navigation and refresh
  • Loading branch information
ssalinas authored Apr 7, 2017
2 parents a633dc8 + f823af3 commit 5a870bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions SingularityUI/app/actions/ui/taskSearch.es6
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@ export const UpdateFilter = (filter) => ({
filter,
type: 'UPDATE_TASK_SEARCH_FILTER'
});

export const refresh = (requestId, count, page) => (dispatch) =>
Promise.all([
dispatch(FetchTaskSearchParams.clear()),
dispatch(FetchTaskSearchParams.trigger(requestId, count, page)),
dispatch(UpdateFilter({ requestId })),
]);
6 changes: 3 additions & 3 deletions SingularityUI/app/components/taskSearch/TaskSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Link } from 'react-router';
import { Glyphicon, Label } from 'react-bootstrap';
import rootComponent from '../../rootComponent';
import { FetchTaskSearchParams } from '../../actions/api/history';
import { UpdateFilter, refresh } from '../../actions/ui/taskSearch';
import { UpdateFilter } from '../../actions/ui/taskSearch';

import Breadcrumbs from '../common/Breadcrumbs';
import TaskSearchFilters from './TaskSearchFilters';
Expand Down Expand Up @@ -121,7 +121,7 @@ class TaskSearch extends React.Component {
ref={(table) => this.bindResetPageAndCount(table)}
>
<Column
label=""
label="Task"
id="url"
key="url"
className="actions-column"
Expand Down Expand Up @@ -213,4 +213,4 @@ function mapDispatchToProps(dispatch) {
};
}

export default connect(mapStateToProps, mapDispatchToProps)(rootComponent(TaskSearch, (props) => refresh(Utils.maybe(props, ['params', 'requestId'], undefined), INITIAL_TASKS_PER_PAGE, 1), false));
export default connect(mapStateToProps, mapDispatchToProps)(rootComponent(TaskSearch, null, false));

0 comments on commit 5a870bc

Please sign in to comment.