Skip to content
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

Update datatables for ajax-datatables-rails 1 #2972

Merged

Conversation

AndrewKvalheim
Copy link
Member

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the upstream master branch.
  • The tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works (if appropriate).
  • I have added necessary documentation (if appropriate).

Short description of what this resolves

#2963 resolved some issues that were detected by the tests, but there are a few more:

  1. The controls for pagination, ordering, and filtering have no effect; the same ten records are always displayed.

  2. Responses to data requests fail with:

     AjaxDatatablesRails::Error::InvalidSearchColumn: Unknown column. Check that `data` field is filled on JS side with the column name
    
  3. The registration datatable fails to render with:

     Uncaught TypeError: cannot use 'in' operator to search for "length" in "["…"
    

Changes proposed in this pull request

  1. Connect the data request parameters to the datatable back end.
  2. Name the actions column.
  3. Update the data sanitization opt-out in accordance with sanitize(data) disabiguation jbox-web/ajax-datatables-rails#326.

To make these updates easier I first removed data and columns that were unused.

Resolves:

  - inability to filter, order, or paginate datatables
  - exception AjaxDatatablesRails::Error::InvalidSearchColumn

Continues:

  - 81853d1
  - 83636af
@hennevogel hennevogel merged commit d471d9e into openSUSE:master Mar 29, 2022
@AndrewKvalheim AndrewKvalheim deleted the ajax-datatables-rails-1_part-2 branch March 30, 2022 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants