Skip to content

Commit 6e7615f

Browse files
committed
Fix bug in max depth eager loading of menu tree
+ TODOs
1 parent 5c1c671 commit 6e7615f

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,15 +368,28 @@ TODO
368368

369369
## TODO's
370370

371+
check:
372+
- do install docs work
373+
- tailwind config complete? do we need to add flexible content blocks styling?
374+
- menu components ok?
375+
376+
menu:
377+
- page delete modal when page used in menu
378+
- orm listeners for linkable models that are in a menu to avoid accidental deletion.
379+
- caching tree model + observer to clear cache
380+
- add menu to default page template
381+
382+
release:
371383
- policies:
372384
- note: undeletable pages
373385
- undeletable page toggle only for permission holder
374386
- redirect controller
375387
- tag controller
376-
- orm listeners for linkable models that are in a menu to avoid accidental deletion.
377-
- page delete modal when page used in menu
378-
- frontend caching for menus
379-
- A simple asset manager
388+
- documentation
389+
- screenshots + banner + packagist + filament plugin store
390+
391+
future:
392+
- A simple asset manager (include or not?)
380393
- Re-usable content blocks
381394
- Contact form
382395

src/Components/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function buildEagerLoadRelations(int $maxDepth): array
8080
$currentPath = '';
8181
$depth = 1;
8282

83-
while ($depth < $maxDepth) {
83+
while ($depth <= $maxDepth) {
8484
$currentPath .= $depth === 1 ? 'children' : '.children';
8585
$relations[$currentPath] = function ($query) {
8686
$query->visible()->ordered()->with('linkable');

0 commit comments

Comments
 (0)