-
-
Notifications
You must be signed in to change notification settings - Fork 858
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
Order and filter not working #1789
Comments
That's odd. Can you try inspecting the ajax request with |
@yajra I'm using Post 1: draw: 1
columns[0][data]: serial_number
columns[0][name]: serial_number
columns[0][searchable]: true
columns[0][orderable]: true
columns[0][search][value]:
columns[0][search][regex]: false
columns[1][data]: modem_sn
columns[1][name]:
columns[1][searchable]: true
columns[1][orderable]: true
columns[1][search][value]:
columns[1][search][regex]: false
columns[2][data]: power_supply_sn
columns[2][name]:
columns[2][searchable]: true
columns[2][orderable]: true
columns[2][search][value]:
columns[2][search][regex]: false
columns[3][data]: name
columns[3][name]:
columns[3][searchable]: true
columns[3][orderable]: true
columns[3][search][value]:
columns[3][search][regex]: false
columns[4][data]: equipment_type_id
columns[4][name]:
columns[4][searchable]: true
columns[4][orderable]: true
columns[4][search][value]:
columns[4][search][regex]: false
columns[5][data]:
columns[5][name]:
columns[5][searchable]: true
columns[5][orderable]: true
columns[5][search][value]:
columns[5][search][regex]: false
order[0][column]: 0
order[0][dir]: asc
start: 0
length: 10
search[value]:
search[regex]: false Response 1: Post 2: draw: 2
columns[0][data]: serial_number
columns[0][name]: serial_number
columns[0][searchable]: true
columns[0][orderable]: true
columns[0][search][value]:
columns[0][search][regex]: false
columns[1][data]: modem_sn
columns[1][name]:
columns[1][searchable]: true
columns[1][orderable]: true
columns[1][search][value]:
columns[1][search][regex]: false
columns[2][data]: power_supply_sn
columns[2][name]:
columns[2][searchable]: true
columns[2][orderable]: true
columns[2][search][value]:
columns[2][search][regex]: false
columns[3][data]: name
columns[3][name]:
columns[3][searchable]: true
columns[3][orderable]: true
columns[3][search][value]:
columns[3][search][regex]: false
columns[4][data]: equipment_type_id
columns[4][name]:
columns[4][searchable]: true
columns[4][orderable]: true
columns[4][search][value]:
columns[4][search][regex]: false
columns[5][data]:
columns[5][name]:
columns[5][searchable]: true
columns[5][orderable]: true
columns[5][search][value]:
columns[5][search][regex]: false
order[0][column]: 0
order[0][dir]: desc
start: 0
length: 10
search[value]:
search[regex]: false Response 2: |
@yajra Does this problem have anything to do with me using Postgres? |
I have this exact same problem, and I'm using MSSql (sqlsrv). The service implementation works but sorting / searching does not work. |
Any updates of this issue? |
@oranges13 did you solve your issue? |
@aline-matos I don't recall exactly what the resolution was, but I do know that the service implementation out-of-the-box did not work for this exact reason. I will try to find the resource I used to modify my application that finally got it working. |
I solve this inssue by overriding the Request class with @sgotre suggestion: |
When dt Request is sent as application/json instead of multipart/form-data and when in ColumnDef boolean values are used the search does not work. (Angular 6 HTTPClient for example) might affect #1789
When dt Request is sent as application/json instead of multipart/form-data and when in ColumnDef boolean values are used the search does not work. (Angular 6 HTTPClient for example) might affect yajra/laravel-datatables#1789
When dt Request is sent as application/json instead of multipart/form-data and when in ColumnDef boolean values are used the search does not work. (Angular 6 HTTPClient for example) might affect yajra/laravel-datatables#1789
When dt Request is sent as application/json instead of multipart/form-data and when in ColumnDef boolean values are used the search does not work. (Angular 6 HTTPClient for example) might affect yajra/laravel-datatables#1789
When dt Request is sent as application/json instead of multipart/form-data and when in ColumnDef boolean values are used the search does not work. (Angular 6 HTTPClient for example) might affect yajra/laravel-datatables#1789
Summary of problem or feature request
Pagination works fine, but it's not ordering or filtering.
Code snippet of problem
Route:
Controller:
Javascript:
JSON Response test 1:
order: [{column: "0", dir: "asc"}]
JSON Response test 2:
order: [{column: "0", dir: "desc"}]
System details
The text was updated successfully, but these errors were encountered: