-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid keyframe value warning #581
Comments
@elringus Thanks for the report! I'll create an fix, but out of curiosity I would like to know why the |
Here's how I use the plugin: export const Scrollable = (props: Props) => {
const ref = useRef<HTMLDivElement>(null);
const { children, scrollX, scrollY, container, className } = props;
const [initialize, getInstance] = useOverlayScrollbars({
options: {
overflow: {
x: scrollX == null ? "scroll" : scrollX ? "scroll" : "hidden",
y: scrollY == null ? "scroll" : scrollY ? "scroll" : "hidden"
},
scrollbars: { clickScroll: true }
},
defer: false
});
useEffect(() => {
if (ref.current != null) {
if (container == null) initialize(ref.current);
else initialize({ target: ref.current, elements: { viewport: container } });
}
return () => getInstance()?.destroy();
}, [container, initialize, getInstance]);
return <div {...props}
ref={ref}
children={children}
className={c(css.scrollable, className)}
data-overlayscrollbars=""/>;
}; I've noticed the warning is only triggered when I use the |
Can confirm edc677f fixes the warnings. I've tried making a minimal repro with just OverlayScrollbars and Virtuoso, but it didn't reproduce. It's probably more complicated. |
@elringus great! I'll publish a new version soon |
|
After an update to the latest version of the react package I've started getting following warnings:
— I guess it should be an easy fix by just guarding against nan, but if you need a repro, I'll try to make one.
The text was updated successfully, but these errors were encountered: