© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
qcol

Custom hierarchical (tree) table - filament or custom row by row?

I am trying to build a hierarchical table that will include row grouping, collapsing and expanding groups (tree structure). One of the columns must contain textinput, at the end of the table a submit button to save changes.

The package https://github.com/staudenmeir/laravel-adjacency-list is very helpful here.

I am doing tests with database queries and with this package I can easily build a tree structure in plain HTML.

Trying to do this in the Filament table but right at the beginning I have a problem because I can't use the query->(Product::find($product_id)->descendants) because package generate ready to use collection, so there is an error (query must be Builder|Closure|null, Collection given)

Question 1. How to get around the error to be able to use the filament table?
Question 2. It is possible that the best way, however, would be to build such a table outside the filament, with loop, row by row. How to do it to use filament components (table with grouping/collapse/expansion)?. Is there somewhere an example of building such a custom table (I can't find)?
GitHub
GitHub - staudenmeir/laravel-adjacency-list: Recursive Laravel Eloq...
Recursive Laravel Eloquent relationships with CTEs - GitHub - staudenmeir/laravel-adjacency-list: Recursive Laravel Eloquent relationships with CTEs
GitHub - staudenmeir/laravel-adjacency-list: Recursive Laravel Eloq...
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Custom table row action
FilamentFFilament / ❓┊help
3y ago
Update rows in table (or table) after action on row
FilamentFFilament / ❓┊help
12mo ago
Table with sub-rows tree
FilamentFFilament / ❓┊help
3y ago