Problem/Motivation
There is a problem with the Hidden and Expandable Columns. It works correctly only when all columns are in status "visible".
Steps to reproduce
1. Create a view, and choose format as Datatables.
2. Add fields title, content type, and counter.
3. Go to the Datatable settings > Hidden and Expandable Columns.
4. Change the title to Expandable, apply, and save it. Check the live page. It should work correctly.
5. Change the type to Expandable, apply, and save it. Check the live page, and it broke. The type is doubled. (screenshot attached)
How to make it work correctly?
Change all fields to visible, apply, and save it. Change Type and Title to Expandable at once, apply, and save it. It works correctly now.
Proposed resolution
Update the logic of the Expandable fields.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | datatables_bug.png | 48.58 KB | just-me |
Issue fork datatables-3590430
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
just-me commentedComment #4
just-me commentedFirst of all, I've merged the parent branch(from jQuery to Vanilla JS).
Figured out the main problem was related to the localStorage.
More info about stateSave here - https://datatables.net/reference/option/stateSave#Examples
So, as I've written in a file, all what needs:
Comment #5
just-me commentedComment #6
quadrexdevLooks good
Comment #9
just-me commentedMerged to 2.x, thanks to everyone.