Given the following nested structure which we get from a single REST endpoint (GET /groups):
we would like to render a couple of nested views which works perfectly on the server. But hydrating the nested views on the client fails with undefined item models in the item view. The nested items are contained in the bootstrappedData but hydrate seems not to take into account how data is passed through nested views.
We transform the items array from the result to a rendr collection by overwriting parse:
GroupModel.prototype.parse = function (result) {
result.items = new Items(result.items, {app: this.app});
return result;
};
@spikebrehm what do you think about this issue? Would you accept a PR?
cc: @zeussolo
Given the following nested structure which we get from a single REST endpoint (
GET /groups):we would like to render a couple of nested views which works perfectly on the server. But hydrating the nested views on the client fails with
undefineditem models in the item view. The nested items are contained in thebootstrappedDatabut hydrate seems not to take into account how data is passed through nested views.We transform the items array from the result to a rendr collection by overwriting
parse:@spikebrehm what do you think about this issue? Would you accept a PR?
cc: @zeussolo