naver / egjs-infinitegrid

A module used to arrange card elements including content infinitely on a grid layout.
https://naver.github.io/egjs-infinitegrid/
MIT License
1.94k stars 91 forks source link

@egjs/react-infinitegrid moveto ? #542

Open chenkuangkuang opened 1 year ago

chenkuangkuang commented 1 year ago

I noticed that other issues mention the moveto method, but @egjs/react-infinitegrid doesn't seem to have this method? Can anyone tell me why?

malangfox commented 1 year ago

Hello @chenkuangkuang.

moveTo is a method that was supported in Infinitegrid v3. As it was removed in Infinitegrid v4, you can implement the same behavior using scroll on the element.

chenkuangkuang commented 1 year ago

@malangfox Hi, I would like to click on a category to jump to specific visible items. How can I do this? setCursors doesn't seem to work either

malangfox commented 8 months ago

We suggest using scrollTo after saving the scroll position of the item you want. This is a demo that moves the scroll position to a specific item. You may consider using an implementation similar to the demo above.