ember-light-table
ember-light-table copied to clipboard
change the property type of column className and cellClassName to be String only
This is regarding the below issue.
https://github.com/offirgolan/ember-light-table/issues/416
That's my first PR in open source community :)
Hi @baljeet03 I'm so sorry for not following up sooner. I'm actually not sure about https://github.com/offirgolan/ember-light-table/issues/416, so I'd need to review with @buschtoens https://github.com/emberjs/ember.js/blob/v3.3.1/packages/ember-views/lib/mixins/class_names_support.js#L32 is an array, so as is should work.
@alexander-alvarez Though ember support it, we are adding this in classBindings and the passed array is being joined by comma ,
rather than space
. So it will not work. One solution is to make this as computed property which will resolve this issue or we could just send as string only. I am open to both but will prefer computed one. I am open to suggestion :)
Ooooh.. I see what you mean now, thanks for the clarification.
https://github.com/offirgolan/ember-light-table/blob/6ee059272b85b7efd2ff5acdead16ac00b8b4461/addon/components/columns/base.js#L23 https://github.com/offirgolan/ember-light-table/blob/v1.8.6/addon/components/cells/base.js#L25 https://github.com/offirgolan/ember-light-table/blob/6ee059272b85b7efd2ff5acdead16ac00b8b4461/addon/components/lt-row.js#L9
Like you mention, I think the computed property one would be best. Make sure to add tests so that we can make sure this works for the case as a string or as an array!