Fixed selected tags lost when chaning page

This commit is contained in:
Alejandro Celaya 2018-09-02 10:39:26 +02:00
parent 34c5a0ef8f
commit 850630092a

View file

@ -83,10 +83,10 @@ export class ShortUrlsListComponent extends React.Component {
}
componentDidMount() {
const { match: { params }, location } = this.props;
const { match: { params }, location, shortUrlsListParams } = this.props;
const query = qs.parse(location.search, { ignoreQueryPrefix: true });
this.refreshList({ page: params.page, tags: query.tag ? [ query.tag ] : [] });
this.refreshList({ page: params.page, tags: query.tag ? [ query.tag ] : shortUrlsListParams.tags });
}
renderShortUrls() {