Skip to content

Commit 7c6405d

Browse files
committed
fix component
1 parent 5a7ae03 commit 7c6405d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/jsonforms-vuetify-renderers/src/components/VMonacoEditor/VMonacoEditor.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ import {
9999
watchEffect,
100100
} from 'vue';
101101
import { useTheme } from 'vuetify';
102-
import { VField, VInput } from 'vuetify/components';
102+
import { VField, VInput, VCounter } from 'vuetify/components';
103103
104104
import { callEvent, type VFieldProps, type VInputProps } from '../common';
105105
import('../../util/monaco-setup');
@@ -384,7 +384,11 @@ onMounted(() => {
384384
editor.value = monaco.editor.create(containerRef.value, {
385385
// default props
386386
fontFamily: updateOptions.fontFamily ?? parentStyle?.fontFamily,
387-
fontSize: updateOptions.fontFamily ?? parentStyle?.fontSize,
387+
fontSize:
388+
(updateOptions.fontSize ??
389+
(parentStyle?.fontSize && !isNaN(parseFloat(parentStyle.fontSize))))
390+
? parseFloat(parentStyle!.fontSize)
391+
: undefined,
388392
lineHeight: updateOptions.lineHeight ?? parentStyle?.lineHeight,
389393
letterSpacing: updateOptions.letterSpacing ?? parentStyle?.letterSpacing,
390394
minimap: { enabled: false },

0 commit comments

Comments
 (0)