Filtering does not work when using Filter::select() or Filter::multiSelect methods instead of Filter::inputText() method. #1834
Unanswered
mckaragulle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, The following filters work with the Filter::inputText() method. However, they do not work with the Filter::multiSelect() or Filter::select() methods. What could be the problem? This is the code that should work. $filter =
Filter::multiSelect("licence_type_category_{$c->id}", 'id') ->dataSource($c->licence_types) ->optionLabel('name') ->optionValue('id') ->filterRelation('licence_types', 'id');
When you add this, it tries to find the column name to be filtered in the model named licence. It also needs to search for a relationship.
Example LicenceTable.php file above.
LicenceTable.txt
Beta Was this translation helpful? Give feedback.
All reactions