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

Backbone-datagrid is broken by the last update on branch master of backbonejs #17

Closed pierre-duchesne closed 11 years ago

pierre-duchesne commented 11 years ago

"this.options" is no more available in a view by default.

Please look at https://github.com/resthub/resthub-backbone-stack/issues/124

loicfrering commented 11 years ago

I prefer to wait for a Backbone release before updating Backbone.Datagrid. In the meantime, this patch should fix the problem:

 var Datagrid = Backbone.View.extend({
-  initialize: function() {
+  initialize: function(options) {
+    this.options = options;
     this.columns = this.options.columns;

Thanks for reporting.

joeyramone76 commented 11 years ago

I'have the same problem, but I need to patch other parts of the code to solve the problem; here https://gist.github.com/joeyramone76/5736346 my patched code.