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.

BooleanCell editable: false but cell still clickable #322

@ThanksForAllTheFish

Description

@ThanksForAllTheFish

I am new to Backgrid.js, so maybe this is my misunderstanding. But, if I set a BooleanCell to editable: false I can still click the generated checkbox.
Moreover, the cell is clickable without the need to be previously selected, as per #166. To disable the cell, I had to copy the rendering function as

name: "active",
label: "Active",
editable: false,
cell: Backgrid.BooleanCell.extend({
    render: function () {
        this.$el.empty();
        this.$el.append($("<input>", {
            tabIndex: -1,
            type: "checkbox",
            checked: this.formatter.fromRaw(this.model.get(this.column.get("name"))),
            disabled: true
        }));
        this.delegateEvents();
        return this;
    }
})

adding disabled: true abruptly.
Am I doing it wrong or is this a misbehavior with BooleanCell?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions