framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.04k stars 3.23k forks source link

How to add infinite scroll event in framework7 #4131

Open gaohomway opened 1 year ago

gaohomway commented 1 year ago

I'm using the Reactjs version, and instead of using infinity on the Page, I'm using it on the div, and don't know how to add the scroll event.

I know it's a useful hyperlink, but I won't use it.


<div className="height-100 overflowY-scroll infinite-scroll-content">

...
</div>

this way doesn't work


f7.$('.infinite-scroll-content').on('infinite', () => {
        console.log('---------')
})
Simone4e commented 1 year ago

Can you create a codesandbox ? Just a note: $('.infinite-scroll-content').on('infinite', instead of f7.$('.infinite-scroll-content').on('infinite',

gaohomway commented 1 year ago

@Simone4e I haven't figured out the usage of $ for the time being, I used the PageContent tag to solve this problem

Simone4e commented 1 year ago

@Simone4e I haven't figured out the usage of $ for the time being, I used the tag to solve this problem

I hadn't seen, it actually looks different from regular JS. It usually is this