Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork69
[4.0] Add support for search panes extension.#137
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
yajra commentedOct 1, 2020
Note to self: It appears that custom panes are not yet fully supported for server-side but the builder added on this PR is already generating a working a scripts. https://datatables.net/extensions/searchpanes/serverside
Also, search panes can be hooked directly to the column builder which triggers a correct ajax request. Column::make('carrier.name') ->searchPanes(SearchPane::make()->modelOptions(Carrier::class,'name','id')) ->title('Carrier'), |
yajra commentedOct 31, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Server-side implementation notesJS Demo ref:https://editor.datatables.net/examples/extensions/searchPanes.html As of writing, it seems like search panes on server-side only works via column definition. To implement, the following builder options can be used: Implementation 1// HTML Builder->addColumnDef(['searchPanes' => ['show' =>true],'targets' => [3],]) Implementation 2useYajra\DataTables\Html\ColumnDefinition;// HTML Builder->addColumnDef(fn(ColumnDefinition$definition) =>$definition->searchPanes()->targets([3])) Implementation 3useYajra\DataTables\Html\ColumnDefinition;// HTML Builder->searchPanes(['hideCount' =>true])// hideCount can be removed if your search pane options supports it->addColumnDef(fn(ColumnDefinition$definition) =>$definition->searchPanes()->targets([3])) |
quantrung9 commentedOct 31, 2020
Finally, thanks@yajra |
* 4.0: Bump v4.34.0 🚀 Add formatted column factory. To complimentyajra/laravel-datatables#2193 Bump v4.34.0 🚀 [4.0] Add support for search panes extension. (#137)
matteocostantini commentedNov 5, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@yajra , i'm using editor to edit name. when i click a value in my pane i see the processing but filter not applied in resultset. Whats appen? this column definition {"data":"carrier.name","name":"carrier_name","title":"Carrier Name","orderable":false,"searchable":false,"searchPanes":{"options":[{"value":"MBE","label":"MBE"},{"value":"UPS","label":"UPS"},{"value":"Corriere Espresso TNT","label":"Corriere Espresso TNT"}]},"visible":true,"editField":"id_carrier"} can depend with $('#example').DataTable().searchPanes.rebuildPane(0, true);? |
Uh oh!
There was an error while loading.Please reload this page.
Fixyajra/laravel-datatables#2463
Fixyajra/laravel-datatables#2471
Fix#130
USAGE