https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42433

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #5 from Jonathan Druart <[email protected]> ---
What is described in comment 0 is the expected behaviour. If you have opened
the page and that a localStorage entry exists then what is saved in the admin
page (and so what is in the DB, table columns_settings) won't be taken into
account.

I can try to explain the differences between the two options and how they work.
They both use the same DataTables feature stateSave
(https://datatables.net/reference/option/stateSave). When we display a table we
are going to try to restore the "state" of the table: from the url (if we
opened the page using the "copy shareable link" button), or from the data
stored in localStorage (the `DataTables_${table_id}` entries).
If none exists we load the default from the config: what is in the DB, and
defaulting on what is in the YML file (admin/columns_settings.yml).

"Save configuration state on page change"
=> save in localStorage the visibility of the columns, the sort order, the page
length. Note that the page number will no longer be saved when bug 41992
(currently PQA) will be pushed.

"Save search state on page change"
=> Save the search terms (global and column filtering)

If we loaded the state from the localStorage, bugs might exist :D
And this is what we (are trying to) fix on bug 42332. Basically the problem is
that we should always have the same number of columns when we build the table
then hide them using JS (DataTables). Currently we add some columns to the DOM
depending on syspref/permissions, then save the state. If the conditions are
modified, DT will fail to restore the state because the number of columns in
the DOM is different than the number of columns in the state stored in
localStorage.

Please tell me if it's not clear enough, I will be happy to clarify more if
needed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to