mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-31 16:37:42 -05:00
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:
1 parent
2813d82996
commit
657b0f82ec
4 files changed
+29
-24
No files matched your search
@@ -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 = {
|
||||
|
||||
Reference in new issue
Block a user