Skip to content

Commit

Permalink
Find formatter only on initial render
Browse files Browse the repository at this point in the history
  • Loading branch information
mikmart committed Jan 24, 2024
1 parent ce068bf commit 415faad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inst/htmlwidgets/datatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,11 @@ HTMLWidgets.widget({
}
r1 = t1; r2 = t2;
})();
// format with active column renderer, if defined
var colDef = data.options.columnDefs.find(function(def) {
return (def.targets === i || inArray(i, def.targets)) && 'render' in def;
});
var updateSliderText = function(v1, v2) {
// format with active column renderer, if defined
var colDef = data.options.columnDefs.find(function(def) {
return (def.targets === i || inArray(i, def.targets)) && 'render' in def;
});
// we only know how to use function renderers
if (colDef && typeof colDef.render === 'function') {
var restore = function(v) {
Expand Down

0 comments on commit 415faad

Please sign in to comment.