Skip to content

Commit

Permalink
fix(grid): fix grid render on resize
Browse files Browse the repository at this point in the history
  • Loading branch information
bluestreak01 committed Oct 16, 2023
1 parent 895de52 commit 93929a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/web-console/src/js/console/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ export function grid(rootElement, _paginationFn, id) {
if (data.length === 0) {
return true
}
return data[0].length === 0;
return data[loPage].length === 0;
}

function render() {
Expand Down Expand Up @@ -1919,7 +1919,9 @@ export function grid(rootElement, _paginationFn, id) {
if (json) {
layoutStoreCache = JSON.parse(json)
}
window.onresize = render

const resizeObserver = new ResizeObserver(render)
resizeObserver.observe(grid);
}

bind()
Expand Down

0 comments on commit 93929a9

Please sign in to comment.