mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 04:03:45 +08:00
(fix) TypeError is logged when you press backspace in an empty keywords input field [SCI-9389]
This commit is contained in:
parent
4a13476b90
commit
6d3b604276
1 changed files with 6 additions and 5 deletions
|
@ -716,15 +716,16 @@ var dropdownSelector = (function() {
|
|||
|
||||
// Add timeout for deleting animation
|
||||
setTimeout(() => {
|
||||
if (selector.data('combine-tags')) {
|
||||
const $selector = $(selector);
|
||||
if ($selector.data('combine-tags')) {
|
||||
// if we use combine-tags options we simply clear all values
|
||||
container.find('.data-field').val('[]');
|
||||
updateTags(selector, container);
|
||||
updateTags($selector, container);
|
||||
} else {
|
||||
// Or delete specific one
|
||||
deleteValue(selector, container, tagLabel.data('ds-tag-id'), tagLabel.data('ds-tag-group'));
|
||||
if (selector.data('config').tagClass) {
|
||||
removeOptionFromSelector(selector, tagLabel.data('ds-tag-id'));
|
||||
deleteValue($selector, container, tagLabel.data('ds-tag-id'), tagLabel.data('ds-tag-group'));
|
||||
if ($selector.data('config').tagClass) {
|
||||
removeOptionFromSelector($selector, tagLabel.data('ds-tag-id'));
|
||||
}
|
||||
}
|
||||
}, 350);
|
||||
|
|
Loading…
Reference in a new issue