Comments (4)
Hi @temo44 !
Thanks for this! Check this link. It explains why we're using the infinity-loader
's guid for the event namespace. It's standard jQuery practise to use .
to namespace an event. Seeing as a developer will probably be binding other scroll events to the window, we want to be sure to only remove this particular one when the infinity-scroller
is destroyed. Make sense?
Also - check out the latest release (just released this morning) #4 - it now has a "scrollable" attribute that can be used to pass in a selector string 😄
from ember-infinity.
Thank you for the reply @hhff !
It makes total sense. However, won't the selector still be incorrect, as Ember generates infinity-loader's guid as an ID, and not a class?
Cool that the feature is introduced 😄.
Awesome addon btw!
from ember-infinity.
Thanks @temo44 !
The guid is only used as the event namespace - ie: the unique string that "scrollable" (usually the window) uses to identify the event name. It's not a selector - it's a scroll event with a unique namespace.
it could be
Ember.$(scrollElement).on("scroll."+Math.random(), function() {
But a GUID is guaranteed to be unique. make sense?
from ember-infinity.
Aaah thanks! It totally makes sense now.
I know where my thought process went wrong 😄 ! I still thought it was part of the 'not-scrolling' problem(hence, the idea that it's a selector instead of a namespace), because I have a different scrolling element. Thank you so much!
from ember-infinity.
Related Issues (20)
- infinity-loader needs to unhide on model change HOT 7
- model.canLoadMore not updating HOT 6
- infinityLoader renders JSON response data twice HOT 4
- isVisible is deprecated in 3.15
- 2.1.0 throws an EEXIST: file already exists on app build HOT 8
- Is it possible to use this component with a horizontal list? HOT 6
- Ember Infinity not working with latest Ember Data 3.17.0 & 3.16.0 HOT 9
- Possible issue with ember-source 3.16.2 HOT 6
- Not working in "ember-cli": "~3.4.4"? HOT 2
- Could not find plugin "proposal-class-properties". Ensure there is an entry in ./available-plugins.js for it.
- Demo link goes to 404. HOT 1
- Non-blocking model hook breaks `reachedInfinity`
- Problem with ember-in-viewport HOT 5
- Update doc examples with ES6 Classes
- devDependencies and dependencies are out of date HOT 2
- Issue with loadPrevious and scrollable HOT 2
- Will the project be supported for ember 4? HOT 2
- Error: Could not find module `@ember/polyfills` imported from `ember-in-viewport/initializers/viewport-config`
- Caching unchanged content ExtendedInfinityModel
- Side effects due to transfer ownership
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-infinity.