Configurable cell_class in DataTable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Wishlist
|
Radomir Dopieralski |
Bug Description
The behavior of DataTable's cells is currently very hard to change or extend. If I want to modify how data is presented, add a widget, icon, even just some style, I have basically two options: either put the HTML directly as the value of the cell, or create my own Row class, with a copy-pasted and slightly modified load_cells method. If I wanted to modify the behavior of any of the auto columns (for example, to make some of the checkboxes for multi select pre-selected), I don't even have a choice -- I have to make my own Row and copy most of its logic. Obviously that's not very nice -- copying the code also makes me copy any and all bugs that are there, and they will stay in the copy even when they are fixed in the original.
I want to propose two changes that should make it easier to extend the behavior of DataTable cells:
1. Move the logic for filling a cell with data into a separate method on the Cell class,
2. Add a cell_class option to DataTableOptions, allowing me to provide my own Cell class, which extends the original one.
Changed in horizon: | |
milestone: | none → icehouse-2 |
importance: | Undecided → Wishlist |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | icehouse-2 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/48018
Review: https:/