Open andrewillard opened 8 years ago
Ow, this is the solution I was looking for...
Thanks to perform this solution bro.
Hi there! Sorry for the delay!
The columnIndex
looks like a nice addition, thanks!
However, I'm not sure if the columnItem
is needed – since all the column properties are available inside beforeCellBind(data, cell)
by using data.column.foo
right? Or am I missing something?
Hi Saulis, no problem, thanks for your attention!
I suggested columnItem
because today we only have row item available to use two way data bind, there aren't a collection items for columns as we have for rows, because we always have created static columns until now. :) I don't know if is possible solve this using beforeCellBind
, do you know?
For dynamic columns we need to set what column item we want to use in two way data bind for each data-table-column
.
If it isn't look good, what do you think about create a new element like data-table-columns
with items
property, so we can do a dom-repeat
inside the element instead do it outside?
Thanks again.
@andrew-silva-movile hmm not sure if I'm missing something.. can you post some example code for the use case?
The reason why I'm a bit confused is that in the PR the only change that columnItem
property makes is that it will be available through cell.columnItem
inside beforeCellBind(data, cell)
right? However, you can already access the same property today by using data.column.columnItem
without adding any new bindings?
I created this PR to make avaialable columnIndex binding beforeCellBind and support set column item when is creating a dynamic column, like:
This change is