Fixed an issue where query tool throws syntax error if a newly added row is untouched and saved. #8028

Fixed an issue where auto-width of wide columns in data output is incorrectly calculated. #8158
This commit is contained in:
Aditya Toshniwal authored and GitHub committed 2024-11-28 14:18:13 +05:30
1 parent 2813d82996
commit 657b0f82ec
4 files changed
+29 -24

No files matched your search

+9 -9
View File
@@ -654,15 +654,15 @@ export function requestAnimationAndFocus(ele) {
});
}
export function scrollbarWidth() {
// thanks too https://davidwalsh.name/detect-scrollbar-width
const scrollDiv = document.createElement('div');
scrollDiv.setAttribute('style', 'width: 100px; height: 100px; overflow: scroll; position:absolute; top:-9999px;');
document.body.appendChild(scrollDiv);
const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
export function measureText(text, font) {
if(!measureText.ele) {
measureText.ele = document.createElement('div');
measureText.ele.style.cssText = `position: absolute; visibility: hidden; white-space: nowrap; font: ${font}`;
document.body.appendChild(measureText.ele);
}
measureText.ele.innerHTML = text;
const dim = measureText.ele.getBoundingClientRect();
return {width: dim.width, height: dim.height};
}
const CHART_THEME_COLORS = {