1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-25 11:37:22 +02:00

(Un)validate transactions

This commit is contained in:
Yohann D'ANELLO
2020-03-14 02:08:23 +01:00
committed by Bombar Maxime
parent c43e8c2dc2
commit cc5185b3ed
3 changed files with 47 additions and 11 deletions

View File

@ -139,7 +139,7 @@ function autoCompleteNote(field_id, alias_matched_id, note_list_id, notes, notes
let pattern = field.val();
// If the pattern is not modified, we don't query the API
if (pattern === old_pattern)
if (pattern === old_pattern || pattern === "")
return;
old_pattern = pattern;
@ -150,11 +150,6 @@ function autoCompleteNote(field_id, alias_matched_id, note_list_id, notes, notes
let aliases_matched_obj = $("#" + alias_matched_id);
let aliases_matched_html = "";
if (pattern === "") {
aliases_matched_obj.html("");
return;
}
// Get matched notes with the given pattern
getMatchedNotes(pattern, function(aliases) {
// The response arrived too late, we stop the request