Skip to content

Commit

Permalink
fix(eda.create_report): fix display issue in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Pham authored and jinglinpeng committed Feb 17, 2022
1 parent e1153cb commit 487659f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dataprep/eda/create_report/templates/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@

<script>
setTimeout(init, 50);
let originalVariables;
function getOriginalVariables(){}

function init() {
const tableRows = document.querySelectorAll('.rp-table tr');
highlightTableValue(tableRows, '#f00');
scientificNotationStrip(tableRows);
originalVariables = Array.from(document.getElementsByClassName("section-variable"));
const originalVariables = Array.from(document.getElementsByClassName("section-variable"));
getOriginalVariables = function(){
return originalVariables;
}
}

function highlightTableValue(element, color) {
Expand Down Expand Up @@ -120,7 +123,7 @@
const selectedOption = e.options[e.selectedIndex].value;
const isReverseOrder = !!document.getElementById("id-variable-reverse-order").checked;
let variableSection = document.getElementById("id-variable-section");
let variables = originalVariables.slice();
let variables = getOriginalVariables().slice();

switch (selectedOption){
case 'original':
Expand Down

0 comments on commit 487659f

Please sign in to comment.