Replies: 1 comment 3 replies
-
TD::make('user.email', 'Email')
->filter(UserEmailFilter::class). // to https://example.com?filter[user.email]=any The filter method in TD adds a prefix, so it does not fit your parameters specified to the filter class |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to implement a custom filter for a relationship field that is displayed on the table, but just can't get it working. Can this be done without resorting to Selections?
The intended functionality: filter the tests from a specific user (by email)
UserEmailFilter.php
The on my TestListScreen.php's
query()
functionThen, on my column:
However, I'm only getting the basic text filter show up and not the one from the
display()
function on my custom one. Of course, text filtering is not working at all since therun()
function is never executing.I'm finding the official docs quite confusing. For instance, it mentions the
filtersApply()
function but the code sample does not use it. What am I missing? Is it actually possible to make this work for that specific column or does it have to be through a Selection? Any help appreciated. 🙏Beta Was this translation helpful? Give feedback.
All reactions