Skip to content

Commit 5372bde

Browse files
authored
fix: panel flashes when using virtual option in react (#916)
* fix: panel flashes when using virtual option in react * chore: add comment for #915
1 parent fadb09b commit 5372bde

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-flicking/src/react-flicking/ReactRenderer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ class ReactRenderer extends ExternalRenderer {
2828
const reactFlicking = this._reactFlicking;
2929
const strategy = this._strategy;
3030

31+
// applyTransform does not work when renderer.rendering is true. #916
32+
// updateRenderingPanels should be called before rendering becomes true, or transform will be applied later.
33+
strategy.updateRenderingPanels(flicking);
3134
this._rendering = true;
3235

33-
strategy.updateRenderingPanels(flicking);
3436
strategy.renderPanels(flicking);
3537

3638
return new Promise<void>(resolve => {

0 commit comments

Comments
 (0)