Add feature to ResizeNotifier to maintain isResizing state and use it to skip onScroll handling

This commit is contained in:
Michael Telatynski 2020-09-02 12:00:35 +01:00
parent 6178b3c0e2
commit cffe902504
9 changed files with 51 additions and 13 deletions

View file

@ -252,6 +252,7 @@ const PersistentVResizer = ({
maxHeight={maxHeight}
onResizeStart={() => {
if (!resizing) setResizing(true);
resizeNotifier.startResizing();
}}
onResize={() => {
resizeNotifier.notifyTimelineHeightChanged();
@ -259,7 +260,7 @@ const PersistentVResizer = ({
onResizeStop={(e, dir, ref, d) => {
setHeight(height + d.height);
if (resizing) setResizing(false);
resizeNotifier.notifyTimelineHeightChanged();
resizeNotifier.stopResizing();
}}
handleWrapperClass={handleWrapperClass}
handleClasses={{bottom: handleClass}}