Closed address2sunil closed 6 years ago
This is not a bug, as ember-frost-table
was not developed with any specific support for ember-frost-bunsen
. The renderer
property in ember-frost-table
is not being passed the correct data in the expected format, as shown in your example.
Thanks for pointing this out. closing the bug.
The ember table API https://ciena-frost.github.io/ember-frost-table/#/frost-table shows how to apply a renderer on a column value for table to render a cell of the column according to the criteria implemented in the cell renderer. This API expects the renderer to be specified as below. The API behaves as expected if the renderer is specified inside column while the ‘columns’ property value is passed directly (e.g. via computed property from the consuming component’s js file). {{frost-table columns=(array (hash label='Real Name' propertyName='realName' renderer=(component 'text-input-renderer') ) ) hook='myTable' items=heroes }}
However, if the ‘columns’ property’s value is passed in form of ‘Bunsen View’ values as is the case in our application, the cell renderer specified for a particular column for that ‘Bunsen View’ does not work as expected. Here is how we pass the ‘columns’ property to frost-table : {{frost-table class="setTableBorder" columns=model.bunsenView items=bunsenValues itemKey=model.itemKey selectedItems=selectedItems onSelectionChange=(action 'onSelectionChange') onCallback=callback }} we apply the renderer inside the view for a column as below. In this case the column values are getting blanked out and we don’t see the control being returned to the renderer/component. 'vlanfixedtableviews': { 'data': [ { 'attributes': { 'version': '2.0', 'type': 'form', 'id': '1', 'jsondata': [ { 'propertyName': 'vlanName', 'label': 'VLAN name', 'renderer': { 'name' : 'nm-frost-table-renderer' } ]}}]} I am suspecting a bug in Bunsen/frost-table which seems to prevent the capability to apply custom cell renderer if ‘columns’ are Bunsen View instead of directly applying the ‘columns’ computed property from the consumer component of the frost table.