stephengolub / rxDataTable

A "catch-all" solution for displaying data in a table format in a basic or extremely complex style.
MIT License
15 stars 8 forks source link

"checkAll" column config property #20

Open Droogans opened 10 years ago

Droogans commented 10 years ago

When I include a table column config such as the following:

{
        "checkbox": true,
        "checkAll": true
}

I expect the checkbox in the sort column to check/uncheck each row's checkbox.

Currently, it doesn't.

stephengolub commented 10 years ago

I think, since I haven't used too much of the check box functionality, I want to refactor the approach on it. Maybe make the checkbox attribute an object like the editable attribute. Thoughts @Droogans?

Maybe something like:

"checkbox" {
  "action": function (row) {...},
  "checkAll": function () {...} // Or a value of true and it will run the action function on each checked row
}
Droogans commented 10 years ago

All I can think is that I don't want to bind my checking to an immediate function. I want some other button on my page to iterate over all checked items, and do x to it.

So, given that, it'd be nice if checkboxes didn't have functions bound to them, they would simply check and do nothing. Same goes for checkAll.

stephengolub commented 10 years ago

Yea, so I think that putting the configuration for that function, however, would still be in the column declaration.

But definitely make things so that there's a bulk-editing mode or somethinng.