Records in Attachment Dialog only show table name, not record name
Hey guys! New to Filament, and read the docs regarding this issue. For some odd reason, when searching for records to attach, it only shows the name of the table, and not the record itself.
For example, I search for Sample User, in the list, it only shows "user"
But when I select the user and attach, it shows the name of the user in the table in the Edit page.
What do? 😦
21 Replies
I think i have seen this before, do you have anything with global search columns in your UserResource ?
Hey! Let me check
Hmm, haven't done anything for search columns
Can you share your
UserResource
Et voila. (thanks for helping out btw!)
2nd half:
3rd half:
Can you try to add this:
im not sure if its gonna work tho
Nada 😦 still "user" instead of the name of the user
Maybe you haven't specified the attach column name or something
I have not used attached yet.
You got the example of where you use it?
I use it an a page called Projects, where you can attach Users to it.
Hmm, I don't think I specified a column name for the attach system
I only followed the Relationship Manager docs on Filament
Mmmm
Im not sure since i have not used it myself yet.
Aww I see, thanks for the suggestion though! Super appreciate it :)))
I will let you know if i figured it out, but i think its something with this:
I tried using Global Search
It crashes
I get this error
I scanned all of my project files, and I have never used User::user()
You need a user model... it might be at: App\User depending on how old your application is.
I already have a model
Sorry, poorly read the message.
It looks like you are doing it backwards, Where is your attach user field?
Right here
Within the UserRelationManager