mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +08:00
Fix duplicated tasks in the table after filtering or duplicating [SCI-7794] (#4865)
This commit is contained in:
parent
d3ce565c1d
commit
0973659f52
2 changed files with 10 additions and 6 deletions
|
@ -11,6 +11,7 @@ var ExperimnetTable = {
|
|||
filters: [], // Filter {name: '', init(), closeFilter(), apply(), active(), clearFilter()}
|
||||
myModulesCurrentSort: '',
|
||||
pageSize: GLOBAL_CONSTANTS.DEFAULT_ELEMENTS_PER_PAGE,
|
||||
provisioningStatusTimeout: '',
|
||||
getUrls: function(id) {
|
||||
return $(`.table-row[data-id="${id}"]`).data('urls');
|
||||
},
|
||||
|
@ -589,7 +590,8 @@ var ExperimnetTable = {
|
|||
});
|
||||
|
||||
if (remainingUrls.length > 0) {
|
||||
setTimeout(() => {
|
||||
clearTimeout(this.provisioningStatusTimeout);
|
||||
this.provisioningStatusTimeout = setTimeout(() => {
|
||||
this.pollProvisioningStatuses(remainingUrls);
|
||||
}, 10000);
|
||||
} else {
|
||||
|
|
|
@ -44,18 +44,20 @@ var filterDropdown = (function() {
|
|||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}).on('hide.bs.dropdown', function() {
|
||||
$('#textSearchFilterHistory').hide();
|
||||
$('.apply-filters', $filterContainer).click();
|
||||
}).on('hide.bs.dropdown', function(e) {
|
||||
if (e.target === e.currentTarget) {
|
||||
$('#textSearchFilterHistory').hide();
|
||||
$('.apply-filters', $filterContainer).click();
|
||||
}
|
||||
});
|
||||
|
||||
$textFilter.click(function(e) {
|
||||
e.stopPropagation();
|
||||
$('#textSearchFilterHistory').toggle();
|
||||
$(e.target).closest('.dropdown').toggleClass('open');
|
||||
$(e.currentTarget).closest('.dropdown').toggleClass('open');
|
||||
}).on('input', (e) => {
|
||||
$('#textSearchFilterHistory').hide();
|
||||
$(e.target).closest('.dropdown').removeClass('open');
|
||||
$(e.currentTarget).closest('.dropdown').removeClass('open');
|
||||
});
|
||||
|
||||
$filterContainer.on('click', '.projects-search-keyword', function(e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue