Hi,
I'm using cell embedded view to render the data in a friendly way.
Some of the raw (not all) i need a subview to display more data.
i'm using this post to transform the input data of the table to include the subview configuration.
But the problem it's seems then dat the embedded view don't get the data as parameter and are just using the default value gived in the designer.
When using a simple named query with the return format set to json. it's working perfectly but each row are then using the subview.
Doesn't anyone have the same issue ?
Regards
Arnaud
What do your table props look like, and what do your subview parameters look like?
Under the columns property, for the column with the subview on it - don’t put anything in view params. Rather on your subview give it an (object) parameter called value with values representing each row. Your subview can get the data from there.
I use render view in the column configuration of the table to render data.
Here above when using a query with return format set to json on the data property:
Here the structure of the data property.
Then i apply a sript transform to include the subview configuration in the data property.
With the same column configuration the view are still displayed inside the cells but with the default value set in the designer and not this the data comming from the cell.
It seems also that the object send to the subview is different also.
What version? The view params passed to a cell configured as a view should have the shape:
viewParams = {
...params, // Merged params listed in the column configuration object of this column
column, // The column name as defined in the field property of the column configuration object
columnIndex, // The index of the column
row, // The true index of the row relative to the source data
rowIndex, // The visual index of the row relative to sorting, paging, and filtering
value, // The value of the table cell
rowData // The entire rows data as a JsonObject
};
Okay. We accidentally introduced a regression in 8.1.12 in regards to view cell and subview view parameters, where we were using the visual row index to fetch the view params from the source data instead of the true index of the row relative to the source data. It’s possible that you’re running into this. We introduced a fix in 8.1.13.
If you set the render to auto, and you’ve specified a view path, the column will assume you want to render a view. That’s expected behavior. As for the other thing you’re experiencing, I’m wondering if your configuration is just not meeting your expectations, as in, is it possible that you have it configured wrong?
Can you post the first row of data here, along with the column configuration for your column titled Transport ID, please. No need for it to be real data.
When render is in auto and the value transportid change, i see a direct update in the embeddedView.
When render is in view and the value change, the new value is not set to the embeddedView.
If have made a example of a table with one column set to auto and one to view
In the embedded view i read the value and the rowData.
I can see that the row data is not the same between auto and view render