mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
Merge pull request #657 from prymitive/debounce-update
fix(ui): debounce grid updates so that they are batched
This commit is contained in:
@@ -80,11 +80,14 @@ const AlertGrid = observer(
|
||||
});
|
||||
// used to call forcePack() which will repack all grid elements
|
||||
// (alert groups), this needs to be called if any group size changes
|
||||
masonryRepack = action(() => {
|
||||
if (this.masonryComponentReference.ref) {
|
||||
this.masonryComponentReference.ref.forcePack();
|
||||
}
|
||||
});
|
||||
masonryRepack = debounce(
|
||||
action(() => {
|
||||
if (this.masonryComponentReference.ref) {
|
||||
this.masonryComponentReference.ref.forcePack();
|
||||
}
|
||||
}),
|
||||
50
|
||||
);
|
||||
|
||||
// how many alert groups to render
|
||||
// FIXME reset on filter change
|
||||
|
||||
Reference in New Issue
Block a user