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 ?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top