Skip to content

Commit

Permalink
πŸ› Fix load more functionality in standby delegate monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Oct 23, 2019
1 parent 7d46d25 commit 606d17f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/shared/delegatesTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ const DelegatesTable = ({
}));

const handleLoadMore = () => {
delegates.loadData({ offset: delegates.data.length, ...filters });
delegates.loadData(Object.keys(filters).reduce((acc, key) => ({
...acc,
...(filters[key] && { [key]: filters[key] }),
}), {
offset: delegates.data.length,
}));
};

const handleFilter = ({ target: { value } }) => {
Expand Down

0 comments on commit 606d17f

Please sign in to comment.