Question

There is refresh function in Spine.js which has this option:

You can pass the option {clear: true} to wipe all the existing records.

but let's say i'm implementing pagination and want all records be cleared on every fetch, because now when i fetch next page, then new records are just appended to current recordset and page bloats, wchich is undesirable. Unfortunately fetch has no such useful option. So is it possible to achieve similar functionality for fetch ?

Était-ce utile?

La solution

The approach I would take is to override the default fetch by adding your custom fetch method on your model

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top