Help to understand filters, mine doesn't work #573
Unanswered
Mozzarella-dev
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Since the keys of your filter are boolean values, you can just do this: return Client::query()
->when($this->getFilter('paying'), fn ($query, $paying) => $query->where('paying', $paying)); In your case |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to implement filters in my datatables but i really can't get them to work.
I've tried to look up to the examples but for my model doesn't have 2fa, nor types/roles... So i tried to copy and modify the
active
to try it out.This is my
ClientTable.php
:in the
client_table
view i've only got formatting of the cells and i think it's not relevant.I'm seeing the filter dropdown on top of the table but doesn't show anything, if i click it nothing happens.
Here's a screenshot on how the filter dropdown appears:
If i include this style globally the filter dropdown disappears:
Now i don't know what i'm doing wrong. All of the other functions of the table work and i don't think i've misplaced the livewire styles or scripts in the document.
Thanks for anybody who helps
Beta Was this translation helpful? Give feedback.
All reactions