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.

Can't use a cell instance as a Column's 'cell' attribute #663

Description

@n0nick

Although the Column documentation says about the cell attribute:

If this is a string, the capitalized form will be used to look up a cell class in Backbone, i.e.: string => StringCell. If a Cell subclass is supplied, it is initialized with a hash of parameters. If a Cell instance is supplied, it is used directly.

I can't get it to work when setting cell to be an instance of a Cell class, and indeed the failing line in the makeCell implementation seems to always want to call new on the given cell value:

  makeCell: function (column) {
    return new (column.get("cell"))({
      column: column,
      model: this.model
    });
  },

https://github.com/cloudflare/backgrid/blob/0.3.7/src/row.js#L77-L82

Am I missing something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions