Good afternoon everyone! My code is not working properly, most likely because I don't understand how to use { useIntersection } to make Controlled Tabs active as I manually scroll through the contents of two Grid.col located one below the other (one called matrix the other seques) when the first disappears from view and only the second rem ains. i want to switch tabs. here is my code
https://codesandbox.io/s/mantine-forked-xnthpn?file=/src/App.tsx&resolutionWidth=462&resolutionHeight=675
If I change the height and width of the window by dragging and dropping I can see how the variable {entry?.isIntersecting ? 'matrix' : 'sequences'} but nothing happens when scrolling, nothing changes.
#how to implement controlled tabs active|not active change using useIntersection?
2 messages · Page 1 of 1 (latest)
You probably do not need useIntersection hook for this. You can find the source code for table of content here – https://github.com/mantinedev/mantine/blob/modal-base/docs/src/components/MdxPage/TableOfContents/TableOfContents.tsx
It has the same logic