Filter + MobX - MeteorJS
See original GitHub issueHi,
I have the following situation: My container loads data from Meteor backend via a Meteor handleTableChange. When the data arrives I set it to an observed variable. This causes the table to be updated. My problem is, that the value in the filter box is removed and it is unknown to the user what filter is used. To get back to the original list, the user can only reload the whole page…
The examples in the story book use setState. But that is irrelevant for my case… My issue also appears when using setState.
What I am wondering is, that as soon as I type a letter, the function handleTableChange is called. I assumed it should only be called after pressing ENTER.
Here’s my function handleTableChange:
handleTableChange = (type, {page, sizePerPage, filters, sortField, sortOrder, cellEdit}) => {
this.loading = true; // @observable loading = true;
if (type === 'filter' || type === 'sort' || type === 'pagination') {
Meteor.call('contractors.loadList', type, page, sizePerPage, filters, sortField, sortOrder, cellEdit, (err, res) => {
if (res) {
this.data = res.data; // @observable data = [];
this.listProps = res; // @observable listProps = { page: 1, sizePerPage: 10, totalSize: 0 };
}
this.loading = false;
});
}
};
The server loads data from database, does the sorting, filtering and paginating of the result set.
I hope you can give me some guidance where or if I am doing something wrong.
Thank you, Josef
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)

Top Related StackOverflow Question
https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/360
It’s a known issue but little hard to fixed, so currently, I will suggest to do not use
react-bootstrap-table2-overlayparticular inremotemode, instead you can custom the overlay vianoDataIndicationFollowing is just a live demo.
I will try to fixed this issue if I can. Thank
yes, that solved it. Thank you. But why?