Skip to content

Commit

Permalink
Move clearing of search suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed Aug 3, 2022
1 parent 836e5a4 commit 0a86dd8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ export default Marionette.ItemView.extend({

showPageSuggestions: function showPageSuggestions(event){
var inputSuggestions = this.toolbarParentObject.find(this.divaInstance.getInstanceSelector() + 'input-suggestions');
inputSuggestions.empty();
var manuscript = manuscriptChannel.request('manuscript');

var pageInput = this.toolbarParentObject.find(this.divaInstance.getInstanceSelector() + 'goto-page-input');

var queryUrl = '/folio-set/manuscript/' + manuscript + '/?q=' + pageInput.val();
$.get(queryUrl,
function (data){
inputSuggestions.empty();
for (const queryResult of data){
var newInputSuggestion = document.createElement('div');
newInputSuggestion.setAttribute('class','diva-input-suggestion');
Expand Down

0 comments on commit 0a86dd8

Please sign in to comment.