pxlrbt/filament-spotlight

Records from resources not showing

EmilioBravo opened this issue ยท 7 comments

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

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

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.

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.

i would be happy as will, if you could fix that ๐Ÿ˜

@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.

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

I updated the readme to explain this.