loicfrering / backbone.datagrid

A powerful component, based on Backbone.View, that displays your Backbone collections in a dynamic datagrid table.
http://loicfrering.github.io/backbone.datagrid/
MIT License
55 stars 14 forks source link

Incompatibility with Backbone 1.0: Not re-rendering the grid when sorting using a Server API #30

Closed gtzoganis closed 11 years ago

gtzoganis commented 11 years ago

Hi,

I am using a remote API to fetch my collections from, and after upgrading Backbone to version 1.0, sorting did no longer work. This is because collection#fetch() does not trigger a 'reset' event by default any more.

I have fixed this locally by adding the reset:true property in the options object, in the _request funcion of Backbone.Datagrid, but I wonder if this is the best approach? If you think this is fine I would happily open a pull request.

Thanks, Gerasimos

loicfrering commented 11 years ago

I think that I already fixed this issue here: dee7196c1d8b833539d7a9d150883822d219d85b. You can test with the 4.0.0-beta.1 version I released two weeks ago. Let me know if it indeed resolves your incompatibility.

Thanks for reporting.

gtzoganis commented 11 years ago

Ah yes, this is exactly how I had fixed it too. I 'm not sure why this wan't in my fork, but most probably it has to do with my weak Git skills :).

This ticket can be closed off, thanks for your reply.

loicfrering commented 11 years ago

Ok, thanks for the feedback.