Mark's app shows the below errors while using both tooltip_conditional and tooltip_data. The tooltips still render, but this breaks parts of his app including a script that tweaks the position and innerText of the DataTable's export button.
This is a skeleton of his DataTable implementation:
# tweaks.js
// function to create interval and remove once
function createInt(){
var interval = setInterval(function(){
// make sure Dash isn't still loading
var loading = document.querySelector("._dash-loading-callback");
if(tgt){
tgt.style.overflow = "";
}
var tgt = document.querySelector(".sidebar--content");
// if tgt exists and Dash isn't still loading, run command and remove interval
if(tgt && !loading){
tgt.style.overflow = "visible"
if(tgt.style.overflow == "visible"){
// document.removeEventListener("DOMContentLoaded", changeOverflow);
clearInterval(interval);
}
}
}, 1000)
}
function checkBtn(){
var interval = setInterval(function(){
var btn = document.querySelector('.export')
var btn_div = document.getElementById('dl-csv-div');
if(btn){
btn_div.prepend(btn)
btn.innerHTML = 'Download Filtered CSV';
btn.style.marginRight = '10px';
clearInterval(interval);
}
}, 100)
}
// Run the overflow function in an interval to be sure it runs properly
function changeOverflow(){
createInt();
}
// listen for original content loading
document.addEventListener("DOMContentLoaded", function(){
changeOverflow();
checkBtn();
});
// listen for URL change
var oldHref = document.location.href;
window.onload = function(){
var bodyList = document.querySelector("body");
var observer = new MutationObserver(function(mutations){
mutations.forEach(function(mutation){
if(oldHref != document.location.href){
oldHref = document.location.href;
changeOverflow();
checkBtn();
}
});
});
var config = {
childList: true,
subtree: true,
}
observer.observe(bodyList, config);
}
Mark's app shows the below errors while using both
tooltip_conditional
andtooltip_data.
The tooltips still render, but this breaks parts of his app including a script that tweaks the position and innerText of the DataTable's export button.This is a skeleton of his DataTable implementation:
cc @plotly/product