Open a branch
Opening a branch reads only its items, up to 100 at a time. The browser never gets the whole tree.
Note: Try it
Open Region 03, then District 03-04, then Store 03-04-01: 25 shelves. Watch the box in the corner: each branch is one small request.
Search all 50,000 items
The search runs on the server and sends back only the matches, with their paths.
Note: Try it
Type “shelf 07-02-11-04”. One shelf among 50,000 is found, under Region 07 › District 07-02 › Store 07-02-11.
Compared with sending every item
Filament’s own Select, given all the items with ->options(): every item is sent to the browser before the list can open, and the more items the tree has, the more is sent.
Note: Try it
Press the button and look at the box in the corner: the latest request is several megabytes, against a few kilobytes for each request above.
Edit the 50,000-item tree
The tree page (TreePage) works the same way: it reads only the branches you open.
Note: Try it
Press the button, open Region 01 › District 01-01 and drag a store onto another district, or select one and press F2 to rename it.