Skip to content

Commit

Permalink
fix: debounce an update after virtualizer size change
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki committed May 10, 2024
1 parent b09e87b commit 81153ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/component-base/src/virtualizer-iron-list-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
/* eslint-disable @typescript-eslint/member-ordering */
// https://github.com/vaadin/eslint-config-vaadin/issues/33
import { animationFrame, timeOut } from './async.js';
import { animationFrame, microTask, timeOut } from './async.js';
import { isSafari } from './browser-utils.js';
import { Debouncer, flush } from './debounce.js';
import { ironList } from './iron-list-core.js';
Expand Down Expand Up @@ -353,6 +353,8 @@ export class IronListAdapter {
// Schedule and flush a resize handler
this._resizeHandler();
flush();
// Fix https://github.com/vaadin/flow-components/issues/6269
this._debounce('_update', this._update, microTask);
}

/** @private */
Expand Down

0 comments on commit 81153ad

Please sign in to comment.