1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

added recalc on cell display change

This commit is contained in:
Fedor Katurov 2019-11-08 12:36:12 +07:00
parent 2c9faf8f9b
commit 23f935aeeb

View file

@ -46,6 +46,11 @@ const Cell: FC<IProps> = ({
checkIfVisible(); checkIfVisible();
}, []); }, []);
useEffect(() => {
// recalc visibility of other elements
window.dispatchEvent(new CustomEvent('scroll'));
}, [flow]);
useEffect(() => { useEffect(() => {
window.addEventListener('scroll', checkIfVisibleDebounced); window.addEventListener('scroll', checkIfVisibleDebounced);