Skip to content

Commit

Permalink
example update
Browse files Browse the repository at this point in the history
  • Loading branch information
patorjk committed Aug 8, 2020
1 parent c311928 commit 8d4c0f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/serverside-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ class Example extends React.Component {
filterType: 'dropdown',
responsive: 'standard',
serverSide: true,
rowsPerPage: 50,
rowsPerPageOptions: [50],

// makes it so filters have to be "confirmed" before being applied to the
// table's internal filterList
Expand Down
7 changes: 6 additions & 1 deletion examples/serverside-sorting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Cities from './cities';
class Example extends React.Component {
state = {
page: 0,
count: 100,
count: 26,
data: [['Loading Data...']],
sortOrder: {},
loading: false,
Expand Down Expand Up @@ -179,6 +179,11 @@ class Example extends React.Component {

this.sort(changedColumn, order);
},
onChangePage: (page) => {
this.setState({page}, () => {
this.sort(this.state.sortOrder.name, this.state.sortOrder.direction);
});
}
};

return (
Expand Down

0 comments on commit 8d4c0f0

Please sign in to comment.