fix: chart resize

This commit is contained in:
jialin
2024-10-23 18:04:34 +08:00
parent f5edf39027
commit 8576015633
9 changed files with 72 additions and 103 deletions
+9 -10
View File
@@ -49,16 +49,15 @@ export default function useOverlayScroller(options?: any) {
scrollEventElement.current =
instanceRef.current?.elements()?.scrollEventElement;
const throttledScroll = React.useMemo(
() =>
throttle(() => {
scrollEventElement.current?.scrollTo?.({
top: scrollEventElement.current.scrollHeight,
behavior: 'smooth'
});
instanceRef.current?.update?.();
}, 300),
[scrollEventElement.current, instanceRef.current]
const throttledScroll = React.useCallback(
throttle(() => {
scrollEventElement.current?.scrollTo?.({
top: scrollEventElement.current.scrollHeight,
behavior: 'smooth'
});
instanceRef.current?.update?.();
}, 100),
[(scrollEventElement.current, instanceRef.current)]
);
const scrollauto = React.useCallback(() => {