Select Filter with Custom FK #8397
Answered
by
leandrocfe
chaseconey
asked this question in
Help
Replies: 1 comment 7 replies
-
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am adding a select filter that I think should be pretty standard, but I will admit that I am pretty new to Filament.
I have 2 related models:
SlackUser, which has a PK of
id
, but a unique id ofslack_id
.I have a relationship from another model that uses this unique key, rather than the primary key.
And in Filament, I am trying to use this relatioship as a filter to be able to select based on Slack user. Filter code looks like this:
The names of the users display properly, but the filter doesn't seem to be working properly. The URL that is generated when applying the filter looks correct to me:
but if I log out the query, it doesn't seem to be using the custom owner key that is provided in the relationship:
Any ideas why it wouldn't be picking up the custom owner key in this situation?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions