Skip to content

Commit

Permalink
Merge pull request #12 from beppo-ivel/Autocomplete-NoDataFound
Browse files Browse the repository at this point in the history
Autocomplete no data found
  • Loading branch information
Jeff-Lang authored Dec 15, 2020
2 parents 4d24e3b + 67031fb commit c250c6c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions custom_ROToolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,11 +1069,15 @@ function createAutoComplete(tag, tagElement) {
(document.getElementById("ac"+targetId)).style.textDecoration = "underline"
this.value(this.dataSource._view[0].DisplayName);
}

if (_.isUndefined(dataItem.BaseId)) {
dataItem.BaseId = !_.isUndefined(dataItem.Id) ? dataItem.Id : null;
}

if(!_.isUndefined(dataItem)){
if (_.isUndefined(dataItem.BaseId)) {
dataItem.BaseId = !_.isUndefined(dataItem.Id) ? dataItem.Id : null;
}
}else{
//clear input value if data isn't found
this.value("");
}

newData.pop();
newData.push(dataItem);
}
Expand Down

0 comments on commit c250c6c

Please sign in to comment.