Open buschtoens opened 7 years ago
@buschtoens provided we can come up with a consistent API for adding class names to table elements it wouldn't matter if the method name was different to class.
I think it would be better to choose a new property name as the hacks involved to use class are likely to be messy and some people might wish to apply a class to the ember element wrapper (e.g. to hide it or something similar).
tClass
or tableElementClass
might work as a name and could replace the tableClassNames
property added for #99 as I believe the API should be harmonious across all table elements.
tClass
ortableElementClass
might work as a name and could replace thetableClassNames
property added for https://github.com/adopted-ember-addons/ember-light-table/issues/99 as I believe the API should be harmonious across all table elements.
Is there any reason not to follow the naming convention adopted with the addition of the tableClassNames
property and simply add support for theadClassNames
, tbodyClassNames
, and tfootClassNames
?
@fran-worley https://github.com/offirgolan/ember-light-table/issues/99#event-734291228:
As a user, I would expect that setting
class
on{{t.head}}
,{{t.body}}
and{{t.foot}}
set these classes on the rendered<thead>
,<tbody>
and<tfoot>
elements.I'm not sure, if we can use
class
as the attribute name here, since it's a magicComponent
keyword that automatically sets theclass
HTML attribute for the rendered component element.