Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configurable cell_class in DataTable
There are two changes in this proposal. One is to move the logic for extracting cell data from the row datum (and handling auto columns) to the Cell class, into a separate method for easy extending. The second is to make that extending possible by making the cell class configurable in the DataTable's meta. Those changes are supposed to make it easier to extend the DataTable with new kinds of cells -- for example, cells that contain an editable widget, a progress bar, an icon, etc. as well as make it easier to modify the behavior of the auto columns -- for example, by making it possible to have some of the multi_select checkboxes preselected. Those changes would also make it easier to integrate DataTable with a Django FormSet. Right now, in order to modify any of the proposed Cell.get_data behavior, one has to make their own Row class and practically copy-paste the whole Row.load_cells method, as there is no easy way to extend it. Change-Id: I29277a9e77e1c413193fe80d3f8cfe001bf5d709 Closes-Bug: #1229677
- Loading branch information
Showing
1 changed file
with
49 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters