ryangjchandler / filament-navigation

Build structured navigation menus in Filament.
MIT License
168 stars 64 forks source link

Custom item types error when using searchable select #15

Closed ryangjchandler closed 2 years ago

ryangjchandler commented 2 years ago

Discussed in https://github.com/ryangjchandler/filament-navigation/discussions/14

Originally posted by **titantwentyone** June 11, 2022 Thanks for the package! I was wanting to integrate this with a `Post` model however I am little unclear on how this is achieved, I've assumed that `FilamentNavigation::addItemType` is to be used in the `boot` method of my `AppServiceProvider`. This gets me so far but I get console errors using the example in the docs: `Alpine Expression Error: Cannot read properties of null (reading 'post_id')` I'm unsure what `post_id` refers to here in terms of my model (if anything - I assume this used to populate the filed name within `data`), which, for simplicity's sake, just has `id`, `title` and `content`. (I tried `id` as well with the same result.). Is there another step needed?