Skip to content

Commit b857a01

Browse files
committed
save $(el) in $el
1 parent 94c9a3e commit b857a01

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

inst/www/shared/shiny.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,7 @@
11941194
this.renderError(el, err);
11951195
},
11961196
renderValue: function(el, data) {
1197+
var $el = $(el);
11971198
var header = data.colnames.map(function(x) {
11981199
return '<th>' + x + '</th>';
11991200
}).join('');
@@ -1204,7 +1205,7 @@
12041205
footer = '<tfoot>' + footer + '</tfoot>';
12051206
var content = '<table class="table table-striped table-hover">' +
12061207
header + footer + '</table>';
1207-
$(el).append(content);
1208+
$el.append(content);
12081209
var oTable = $(el).children("table").dataTable($.extend({
12091210
"bProcessing": true,
12101211
"bServerSide": true,
@@ -1214,11 +1215,11 @@
12141215
"sAjaxSource": data.action
12151216
}, data.options));
12161217
// use debouncing for searching boxes
1217-
$(el).find('label input').first().unbind('keyup')
1218+
$el.find('label input').first().unbind('keyup')
12181219
.keyup(debounce(data.searchDelay, function() {
12191220
oTable.fnFilter(this.value);
12201221
}));
1221-
var searchInputs = $(el).find("tfoot input");
1222+
var searchInputs = $el.find("tfoot input");
12221223
searchInputs.keyup(debounce(data.searchDelay, function() {
12231224
oTable.fnFilter(this.value, searchInputs.index(this));
12241225
}));

0 commit comments

Comments
 (0)