-
-
Notifications
You must be signed in to change notification settings - Fork 111
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Custom filters in SpladeTable Component #359
Comments
Did you mean splade data table filter ? php artisan make:table Users will look like this $table
// ...other column's
->selectFilter(
key: 'id',
label: 'Country',
options: \App\Models\Country::all(['id', 'name'])->toArray()
)
// ...other column's @luisvbz CMIIW |
Yes, I know it has those filters. Actually, I use them quite often. @zulfikar-ditya thanks for reply me
Yes, I know it has those filters. Actually, I use them quite often. |
Ah my bad, |
Any updates? |
#162 stil in draft |
Always get:
when i try to fill the options of the select-filter: options: ObjektGruppe::all(['id', 'gruppe_name_de'])->toArray() , it only works with: options: [8 => 'Gemälde', 22 => 'Porzellan',], how can i dynamicly fill the select-filter? |
Use mapWithKeys() to flatten the array to key/value pairs:
|
Thank you Daniel, that helped.
|
I just found another problem, but maybe I'm just making a mistake? The SQL string that is created:
The problem is that the key is filtered as a string with LIKE:
So I don't get a unique group, it would have to be filtered for an integer:
how can I influence that? |
Don't know about the LIKE, but this:
This will first load all records from the DB and than do the where() and sortBy() on the collection. You might want to do it the following way, which will do the filtering and ordering on the DB side:
|
Unfortunately my English isn't the best :) the select component is filled and displayed correctly, but when I try to filter and select an element, the SQL string described above is generated internally by Splade.. I have no influence on that.. 1 painting If you now filter by |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello, it would be great to have the possibility of adding custom filters in SpladeTable tables with a slot and thus adding these filters with the Splade form components.
For example:
So we could use these filters automatically by the key attributte or using the When function within the SpladeTable class
For exmaple:
By the way, excellent work!
The text was updated successfully, but these errors were encountered: