pxlrbt / filament-spotlight

Quickly navigate your Filament pages
MIT License
239 stars 31 forks source link

Records from resources not showing #14

Closed EmilioBravo closed 1 year ago

EmilioBravo commented 1 year ago

When I search for a record for it's title it doesn't show up in the spotlight results

pxlrbt commented 1 year ago

Did you select the Edit/View entry first before searching? The navigation is nested.

studiowizjo commented 1 year ago

I got the same. At first I select "Website - Edit" and then records on list shows only when I type letters containing "website":

Zrzut ekranu 2022-11-11 10

If I translate it in my WebsiteResource:

protected static ?string $label = 'strona';

then it searchs in my translated word: "strona" and presents it in search results.

I don`t see anything special in my resource, which could be related.

Thought it might make a difference to not use Model::unguard(); and list attributes in $fillable in model, but that didn't help either.

pxlrbt commented 1 year ago

Thanks @studiowizjo. I just checked it and confirm that this is a bug. I think it used to work, so maybe there was a change in Filament that broke this. I will look into this.

michabbb commented 1 year ago

i would be happy as will, if you could fix that 😏

pxlrbt commented 1 year ago

@michabbb Are you on the latest version? I think this should have been fixed with v0.3.6. I just tested with the Filament Demo and it works.

michabbb commented 1 year ago

@pxlrbt pardon, a few minutes ago i found out that i had to set $recordTitleAttribute in my resource to get any findings 😏

pxlrbt commented 1 year ago

I updated the readme to explain this.