Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Subclassing Backgrid.Grid #486

@gxxcastillo

Description

@gxxcastillo

I have something like:

var columns = [...];
var collection = new Backbone.Collection(...);

// This does not work
var CustomGrid = Backgrid.Grid.extend({
     columns: columns
    , className: 'backgrid customBackgrid'
});

var grid = new CustomGrid({collection: collection})

However, it fails to render and only seems to work if I call the Backgrid.Grid() constructor directly and pass it all the arguments:

// This works
var grid = new Backgrid.Grid({
     columns: columns
    , className: 'backgrid customBackgrid'
    , collection: collection
})

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions