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:
parent
2c9faf8f9b
commit
23f935aeeb
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue