I want to build a user interface with the table componente which a tree system view, like each of the rows can expand and show related rows from other tables, and these child rows can also expand and show related rows from another table...
I used the grouping functionality of the table component, after retrieve all record using JOIN of all tables, then group them by father's ID, then by child1 ID
...
but I'm not sure if it's the good way to achieve that
SQL code:
SELECT
*
FROM
"ProjectList" pl
FULL JOIN "Test" t
ON pl.id = t.referenceid
FULL JOIN "Seleccion" s
ON t.id = s."testId"
LIMIT
{{ table1.pagination.pageSize }}
OFFSET
{{ table1.pagination.offset }}
I want to get something like this:
-project1 : fields
- test1: fields
-seleccion1:fieldss
-test2: fields
-seleccion2:fields
-project2: fields
-test3: filds
-test4:fields
-seleccion.....
....
Another problem is that i'm using the server-pagination and I saw that group functionaly is not available with server-pagination, how can I solved that
We have a feature request to support server side pagination + grouping. I don't have an eta on the request, but I'll post here if I get any updates.
How many records are you working with? Curious if client side pagination works for your use case in the meantime! You can nest tables in expanded rows. You also get access to currentRow (and currentSourceRow) which could help filter your data so that it doesn't need to be in one large query:
Thanks for the reply, the number of the records will grow up quickly, because the number of the user is around 50 or more, the case is, if I use client side, the page is going to retrieve all the record of the database, right? Doesn't it make the app very slow?
And about the nested tables, I have like 4 nest levels, in the sample you shown, when the page load, the query will retrieve all data from the children tables to the app. I would like to have something like this: show and retrieve 10 or 20 Master/father records per page, and also retrieve from the database, all children record of those master records to show them, when the row is expanded, reducing the user's workload.
I don't know if there is a better way to achieve that...
Hi @Zheng apologies for the delay here! Hmm if the data is scaling up quickly, you may need to wait for the feature request to ship
I suggested client side because our table component is virtualized and designed to be pretty performant with larger datasets. That said, you can still run into performance issues if you're querying a ton of data upfront (For example, query timeouts when pulling in massive datasets)