grommet / grommet-designer

Apache License 2.0
36 stars 18 forks source link

Improve the render capability in DataTable #87

Open ecircenis opened 4 years ago

ecircenis commented 4 years ago

The render capability allows for defining the content of a table cell, but that same content is then repeated for all table cells in the same column. This makes it difficult to prototype cells containing things like status icons, for example, where the prototype intends to show a variety of different states for different table rows.

Suggestions:

  1. (not great) Allow the render box to contain an Alternative and cycle through the options as rows are created.
  2. (great) Give the user the ability to specify render content for specific rows. A way to do this might be to key off of values in the JSON data for that column to indicate which named component should be displayed in a cell.