← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1229677] Re: Configurable cell_class in DataTable

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1229677

Title:
  Configurable cell_class in DataTable

Status in OpenStack Dashboard (Horizon):
  Fix Released

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1229677/+subscriptions