fix: pagination on all page

This commit is contained in:
caturbgs
2021-12-22 22:15:04 +07:00
parent 3bce86ea5f
commit 1e92eee5b5
7 changed files with 60 additions and 68 deletions

View File

@@ -281,15 +281,15 @@ export const ProductComponent = observer((props) => {
pagination={{
onChange: async (page) => {
store.product.pageSize = page.pageSize;
store.product.page = page.current;
store.product.page = page.current - 1;
modalLoader.setLoading(true);
await store.product.getData();
modalLoader.setLoading(false);
},
pageSize: store.product.pageSize,
total: store.product.total_data,
current: store.product.page,
style: { marginBottom: "1rem", marginRight: "1rem" },
current: store.product.page + 1,
style: {marginBottom: "1rem", marginRight: "1rem"},
}}
dataSource={store.product.data}
style={{ padding: 0 }}