diff --git a/app/static/app/js/components/TaskList.jsx b/app/static/app/js/components/TaskList.jsx index 541407cf..b41d81bb 100644 --- a/app/static/app/js/components/TaskList.jsx +++ b/app/static/app/js/components/TaskList.jsx @@ -3,6 +3,7 @@ import '../css/TaskList.scss'; import TaskListItem from './TaskListItem'; import PropTypes from 'prop-types'; import $ from 'jquery'; +import HistoryNav from '../classes/HistoryNav'; import { _, interpolate } from '../classes/gettext'; class TaskList extends React.Component { @@ -19,6 +20,8 @@ class TaskList extends React.Component { constructor(props){ super(props); + this.historyNav = new HistoryNav(props.history); + this.state = { tasks: [], error: "", @@ -54,6 +57,10 @@ class TaskList extends React.Component { this.taskListRequest = $.getJSON(this.props.source, json => { + if (json.length === 1){ + this.historyNav.addToQSList("project_task_expanded", json[0].id); + } + this.setState({ tasks: json }); @@ -67,7 +74,7 @@ class TaskList extends React.Component { .always(() => { this.setState({ loading: false - }) + }); }); }