Hello,
is there a prepared "base fiddle" which allows useage of Bryntum componens with vue?
Sadly I am currently not able to reach the "examples" side (https://www.bryntum.com/examples/grid/) therefore I am posting questions which potentially are solved in there.
I have 2 classes (typescript):
export default class Person {
readonly personId: number;
readonly cats: Cat[];
readonly randomInfo: string;
}
export default class Cat {
readonly catId: number;
readonly randomInfo: string;
}
Now I want to show this data in a tree grid with 3 columns, example:
PersonId | CatId | RandomInfo
1 | | This is a person
| 1 | First Cat
| 2 | Second Cat
So my first problem ist using the "cats" property instead of a "children" property, is this possible?
If I switch to children I get the tree to show up, but I am still not able to handle empty data.
My current code looks like this:
<template>
<bryntum-grid
class="fill-size"
:columns="personHeaders"
:data="persons"
:treeFeature="true"
:readOnly="true"
>
</bryntum-grid>
</template>
//...
private personHeaders: any = [
{ text: 'PersonId', field: 'personId', type: 'tree'},
{ text: 'CatId', field: 'catId'},
{ text: 'RandomInfo', field: 'randomInfo'},
]
which results in roughly this:
PersonId | CatId | RandomInfo
1 | | This is a person
_generatedClassDefEx1 | | First Cat
_generatedClassDefEx2 | | Second Cat
So how could I handle data which is only present in some of the tree entities? (personId for Persons and catId for Cats)
Thanks for your help in advance and Best Regards,
Mercury