Commit d96d3dfb by zhaochengxiang

bug fix

parent 9fccf18f
...@@ -370,8 +370,12 @@ const AssetTable = (props) => { ...@@ -370,8 +370,12 @@ const AssetTable = (props) => {
}, },
callback: data => { callback: data => {
const anchorLocation = data.offset; const anchorLocation = data.offset;
const _pageNum = parseInt(anchorLocation/pageSize + ((anchorLocation%pageSize===0)?0:1)); if (anchorLocation > 0) {
setPagination({ ...pagination, pageNum: _pageNum }); const _pageNum = parseInt(anchorLocation/pageSize + ((anchorLocation%pageSize===0)?0:1));
setPagination({ ...pagination, pageNum: _pageNum });
} else {
setPagination({ ...pagination, pageNum: 1 });
}
}, },
error: () => { error: () => {
setLoading(false); setLoading(false);
...@@ -392,8 +396,12 @@ const AssetTable = (props) => { ...@@ -392,8 +396,12 @@ const AssetTable = (props) => {
}, },
callback: data => { callback: data => {
const anchorLocation = data.offset; const anchorLocation = data.offset;
const _pageNum = parseInt(anchorLocation/pageSize + ((anchorLocation%pageSize===0)?0:1)); if (anchorLocation > 0) {
setPagination({ ...pagination, pageNum: _pageNum }); const _pageNum = parseInt(anchorLocation/pageSize + ((anchorLocation%pageSize===0)?0:1));
setPagination({ ...pagination, pageNum: _pageNum });
} else {
setPagination({ ...pagination, pageNum: 1 });
}
}, },
error: () => { error: () => {
setLoading(false); setLoading(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment