table filters dependent fields #2891
ainesophaur
started this conversation in
Ideas
Replies: 1 comment 8 replies
-
|
You can pass a All filters are reactive by default, which is why there is no Filters are not form components, which is why all the options are not available. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be awesome to bring in the magic of
filament/formsspecial DI$getwhen creating table filters.The use case would be to allow callbacks inside of
$filter->options()to access other dependent form filter values using$getin the same way we can withfilament/formsIve tried using custom filters but when using a
Forms\Components\BelongsToSelectin the form combined with a relation, it errors out trying to call the relationship function on a null object (presumably because there is no$modelbound to the form)Call to a member function ticketStatus() on null. I can achieve the desired result using regularForms\Components\Selectand manually creating the options etc. However, I feel there is more benefit to usingBelongsToSelectover a regularSelect. If we can bring the magic of$getto table filters then we're able to have a more consistent DX across both packages.Below is some sample pseudo code that would be desired
Beta Was this translation helpful? Give feedback.
All reactions