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

Not compatible with backbone 1.1.0 #33

Open Darksoulsong opened 10 years ago

Darksoulsong commented 10 years ago

Backbone version: 1.1.0 Underscore vs: 1.5.2 RequireJS version: 2.1.9 Google Chrome: 32.0.1700.76 m

I had to change a bunch of lines where the options are not passed as parameter to the initialize function to some views (almost all of them). Is this project still being supported?

Example: From:

var Header = Datagrid.Header = Backbone.View.extend({
  tagName: 'thead',

  initialize: function() {
    this.columns = options.columns;
    this.sorter  = options.sorter;
  },

to:

    var Header = Datagrid.Header = Backbone.View.extend({
      tagName: 'thead',

  initialize: function(options) {
    this.columns = options.columns;
    this.sorter  = options.sorter;
  },

And this happens on every view definition.

The sorting is not working too.

I'm using it on a requirejs setup, included as a shim.

loicfrering commented 10 years ago

Hi @Darksoulsong, thanks for reporting. The project is still maintained and used: I have on my todo to work on 1.1.0 compatibility very soon, I'll keep you updated.

Darksoulsong commented 10 years ago

@loicfrering TYVM. I'm looking forward to it. =)

loicfrering commented 10 years ago

@Darksoulsong I tested Backbone.Datagrid v0.4.0-beta.1 with Backbone 1.1.*, everything looks ok: I fixed the issue with this.options in e89b25764613c98327ba6e39b37a4675020a50cd.

Let me know if you encounter any problem.