Skip to content

Commit

Permalink
use .closest()
Browse files Browse the repository at this point in the history
  • Loading branch information
stla committed Oct 27, 2023
1 parent 4b4df7c commit 2292272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/htmlwidgets/jstreer.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ HTMLWidgets.widget({
if(x.search) {
if(x.grid) {
var $div = $(gridSearchBoxes(x.grid, el.id));
var $midWrapper = $(".jstree-grid-midwrapper");
var $midWrapper = $el.closest(".jstree-grid-midwrapper");
$div.insertBefore($midWrapper);
var divSelector = "#" + el.id + "-searchFields";
//add search functionality to the input fields
Expand Down

0 comments on commit 2292272

Please sign in to comment.