Hi,
I'm using a column template to conditionally show some buttons to the user.
The 2 issues I have:
1. How to call a function on my angular2 component, passing in a value from that row?
Currently I have found a way, involving hidden input elements, but I'm sure there must be a more elegant way to handle this.
2. When I click one of the buttons, it updates a boolean property of the object behind that row, but the column template isn't updated accordingly.
Attached you can find a sample I've created starting from https://github.com/IgniteUI/igniteui-angular2/tree/master/samples/igGrid.
Steps to reproduce:
1. click the Add' button
2. click "Publish" or "Unpublish" on one of the records
Thanks in advance for your answer.
Hello Maarten,
Thank you for the update. We don’t have an exact timeline, you will have to watch the items I linked to on github to see when they get merged into the code on github. Typically, this doesn’t take more than a few days, however this depends upon the workload and any pending deadlines so it may take longer if there are higher priority items.
Hello,
Thanks for the clarification.
Do you have any idea, when these 2 changes will be released?
They are quite urgent and might be showstoppers for using the grid in our projects.
Kind regards.
Thank you for your patience. I have discussed this with my team and have the following information. First there was an issue with it updating the incorrect cell when one of the columns is hidden, there is a pending pull request for this that when merged will make it so that the change I mentioned of calling data bind will make this work properly:
https://github.com/IgniteUI/igniteui-angular2/pull/135
The second is template cell do not consider the record value when updated:https://github.com/IgniteUI/igniteui-angular2/issues/137
As a note currently you have to call dataBind because when you change a cell value only the cell is re-rendered and not the whole row. Our team is planning to make it so that the whole row is updated in case any templates require updates when other cell values are updated. This change should be made with the second github item I linked to.
Please let me know if you have any further questions concerning this matter.
Hello Maarten, Thank you for the update. I have been able to reproduce the behavior you describe. I am currently discussing this matter further with my team and will update with more information Monday.
Hi Mike,
Already tried that.
You can see that 'Publish' now becomes 'Unpublish' for very little time.
Afterwards it does fall back to 'true', just like in the first sample.
Attached you can find my changes.
Thanks for your help!
Maarten