Comments (3)
If I understand this issue correctly, you have an event listening that needs to access the state of the collection and you need all the states to be updated when u access them? This can be tricky since Backbone event handlers are applied backwards. So add
, remove
, reset
, sort
are all affected...
from backbone-pageable.
Actually I was wrong, event handlers are fired in order in Backbone.
I think this problem is caused by the PageableCollection event handler is listening on all
and the state is updated inside the all
event handler, but all
is fired after all the other more granular event are fired first so if you are listening to those, you don't see the updated state.
from backbone-pageable.
Ok this will take me a while to fix. For now I think you should listen to all
and detect the event type passed instead as a workaround. It will be forward compatible even after I've made the fix.
from backbone-pageable.
Related Issues (20)
- `totalRecords` must be a finite integer HOT 9
- Pageable breaks when cloning collection HOT 15
- A bit tedious to prepare two sets of meta for server mode and infinite mode HOT 10
- Infinite Scrolling, Parse Link Error HOT 12
- Little concern about getLastPage() in server mode HOT 2
- Returning to same point in infinite when going back HOT 1
- getPage doesn't set correctly currentPage in client mode HOT 1
- infinite collection / fullcollection is confusing HOT 14
- Relationship between parseLinks and queryParams in infinite mode HOT 1
- Suggestion: infinite mode reset method HOT 6
- Uncaught RangeError: `currentPage` must be firstPage <= currentPage >= totalPages if 0-based. Got 7. HOT 10
- Support for 'pagesInRange' which is currently supported in Paginator. HOT 3
- Problematic line in combination with uglifier... HOT 3
- Setting order to null in queryParams sends null=desc or null=asc to server HOT 3
- Removing all items on a page does not change the page HOT 1
- Switching automatically between modes (Infinite to server mode)
- Get Method for getting individual queryParams value
- Weird behaviour with pageable on filtering
- Paginating with getNextPage() without Backgrid client mode
- In client mode, collection add will trigger remove event. HOT 1
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 backbone-pageable.