mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 18:45:56 +08:00
fix: clickhouse editor cursor sync issue (#5435)
This commit is contained in:
parent
4d64f1dede
commit
79eef5bb91
@ -141,11 +141,6 @@ function ImportJSON({
|
|||||||
colors: {
|
colors: {
|
||||||
'editor.background': Color.BG_INK_300,
|
'editor.background': Color.BG_INK_300,
|
||||||
},
|
},
|
||||||
fontFamily: 'Space Mono',
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: 'normal',
|
|
||||||
lineHeight: 18,
|
|
||||||
letterSpacing: -0.06,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,6 +228,11 @@ function ImportJSON({
|
|||||||
fontFamily: 'Space Mono',
|
fontFamily: 'Space Mono',
|
||||||
}}
|
}}
|
||||||
theme={isDarkMode ? 'my-theme' : 'light'}
|
theme={isDarkMode ? 'my-theme' : 'light'}
|
||||||
|
onMount={(_, monaco): void => {
|
||||||
|
document.fonts.ready.then(() => {
|
||||||
|
monaco.editor.remeasureFonts();
|
||||||
|
});
|
||||||
|
}}
|
||||||
// eslint-disable-next-line react/jsx-no-bind
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
beforeMount={setEditorTheme}
|
beforeMount={setEditorTheme}
|
||||||
/>
|
/>
|
||||||
|
@ -53,7 +53,6 @@ function Overview({
|
|||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
// fontFamily: 'SF Mono',
|
|
||||||
fontFamily: 'Space Mono',
|
fontFamily: 'Space Mono',
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
lineHeight: '18px',
|
lineHeight: '18px',
|
||||||
@ -80,12 +79,6 @@ function Overview({
|
|||||||
colors: {
|
colors: {
|
||||||
'editor.background': Color.BG_INK_400,
|
'editor.background': Color.BG_INK_400,
|
||||||
},
|
},
|
||||||
// fontFamily: 'SF Mono',
|
|
||||||
fontFamily: 'Space Mono',
|
|
||||||
fontSize: 12,
|
|
||||||
fontWeight: 'normal',
|
|
||||||
lineHeight: 18,
|
|
||||||
letterSpacing: -0.06,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +117,11 @@ function Overview({
|
|||||||
onChange={(): void => {}}
|
onChange={(): void => {}}
|
||||||
height="20vh"
|
height="20vh"
|
||||||
theme={isDarkMode ? 'my-theme' : 'light'}
|
theme={isDarkMode ? 'my-theme' : 'light'}
|
||||||
|
onMount={(_, monaco): void => {
|
||||||
|
document.fonts.ready.then(() => {
|
||||||
|
monaco.editor.remeasureFonts();
|
||||||
|
});
|
||||||
|
}}
|
||||||
// eslint-disable-next-line react/jsx-no-bind
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
beforeMount={setEditorTheme}
|
beforeMount={setEditorTheme}
|
||||||
/>
|
/>
|
||||||
|
@ -87,9 +87,6 @@ function ClickHouseQueryBuilder({
|
|||||||
'editor.background': Color.BG_INK_300,
|
'editor.background': Color.BG_INK_300,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
document.fonts.ready.then(() => {
|
|
||||||
monaco.editor.remeasureFonts();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -105,6 +102,11 @@ function ClickHouseQueryBuilder({
|
|||||||
height="200px"
|
height="200px"
|
||||||
onChange={handleUpdateEditor}
|
onChange={handleUpdateEditor}
|
||||||
value={queryData.query}
|
value={queryData.query}
|
||||||
|
onMount={(_, monaco): void => {
|
||||||
|
document.fonts.ready.then(() => {
|
||||||
|
monaco.editor.remeasureFonts();
|
||||||
|
});
|
||||||
|
}}
|
||||||
options={{
|
options={{
|
||||||
scrollbar: {
|
scrollbar: {
|
||||||
alwaysConsumeMouseWheel: false,
|
alwaysConsumeMouseWheel: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user