mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 15:36:22 +08:00
Preserve scroll position in the samples coluns dropdown when reordering [SCI_788]
This commit is contained in:
parent
e5a0ad9b23
commit
de12fac767
|
@ -914,7 +914,9 @@ function changeToEditMode() {
|
|||
|
||||
// loads the columns names in the dropdown list
|
||||
function loadColumnsNames() {
|
||||
// First, clear the list
|
||||
// Save scroll position
|
||||
var scrollPosition = dropdownList.scrollTop();
|
||||
// Clear the list
|
||||
dropdownList.find('li[data-position]').remove();
|
||||
_.each(table.columns().header(), function(el, index) {
|
||||
if (index > 1) {
|
||||
|
@ -951,6 +953,8 @@ function changeToEditMode() {
|
|||
dropdownList.append(html);
|
||||
}
|
||||
});
|
||||
// Restore scroll position
|
||||
dropdownList.scrollTop(scrollPosition);
|
||||
toggleColumnVisibility();
|
||||
// toggles grip img
|
||||
customLiHoverEffect();
|
||||
|
|
Loading…
Reference in a new issue