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

BooleanCell editable: false but cell still clickable #322

Closed
ThanksForAllTheFish opened this issue Aug 20, 2013 · 0 comments
Closed

BooleanCell editable: false but cell still clickable #322

ThanksForAllTheFish opened this issue Aug 20, 2013 · 0 comments
Labels
Milestone

Comments

@ThanksForAllTheFish
Copy link

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?

@wyuenho wyuenho closed this as completed in e239322 Sep 7, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant