forked from Wavyzz/dolibarr
Fix: clear old data before update
This commit is contained in:
@@ -139,6 +139,11 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
||||
}
|
||||
// Update an input
|
||||
if (ui.item.update) {
|
||||
// clear old data before update
|
||||
$.each(ui.item.update, function(key, value) {
|
||||
$("#" + key).val("");
|
||||
});
|
||||
// update fields
|
||||
$.each(ui.item.update, function(key, value) {
|
||||
$("#" + key).val(value).trigger("change");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user