Moved management of filtering options to own reducer

This commit is contained in:
Alejandro Celaya
2018-06-17 17:12:16 +02:00
parent 6587a08ed1
commit 1f157a015b
8 changed files with 100 additions and 21 deletions

View File

@@ -16,7 +16,14 @@ import './ShortUrlsList.scss';
export class ShortUrlsList extends React.Component {
componentDidMount() {
const { match } = this.props;
this.props.listShortUrls(match.params.serverId, { page: match.params.page });
console.log(this.props.shortUrlsListParams, match.params, {
...this.props.shortUrlsListParams,
page: match.params.page
});
this.props.listShortUrls(match.params.serverId, {
...this.props.shortUrlsListParams,
page: match.params.page
});
}
render() {
@@ -129,4 +136,5 @@ class RowMenu extends React.Component {
export default connect(state => ({
shortUrlsList: state.shortUrlsList,
selectedServer: state.selectedServer,
shortUrlsListParams: state.shortUrlsListParams,
}), { listShortUrls })(ShortUrlsList);