@@ -304,20 +304,16 @@ export const ChipExpressionEditorComponent = (props: ChipExpressionEditorCompone
304304 ...( props . isInExpandedMode
305305 ? [ EditorView . theme ( {
306306 "&" : { height : "100%" } ,
307- ".cm-scroller" : { overflow : "auto" }
307+ ".cm-scroller" : { overflow : "auto" , maxHeight : "100%" }
308308 } ) ]
309309 : props . sx && 'height' in props . sx
310310 ? [ EditorView . theme ( {
311- "&" : {
312- height : typeof ( props . sx as any ) . height === 'number' ?
313- `${ ( props . sx as any ) . height } px` :
314- ( props . sx as any ) . height
315- } ,
316- ".cm-scroller" : { overflow : "auto" }
311+ "&" : { height : "100%" } ,
312+ ".cm-scroller" : { overflow : "auto" , maxHeight : "100%" }
317313 } ) ]
318314 : [ EditorView . theme ( {
319315 "&" : { maxHeight : "150px" } ,
320- ".cm-scroller" : { overflow : "auto" }
316+ ".cm-scroller" : { overflow : "auto" , maxHeight : "150px" }
321317 } ) ] )
322318 ]
323319 } ) ;
@@ -435,14 +431,18 @@ export const ChipExpressionEditorComponent = (props: ChipExpressionEditorCompone
435431 < ChipEditorContainer ref = { fieldContainerRef } style = { {
436432 position : 'relative' ,
437433 ...props . sx ,
438- ...( props . isInExpandedMode ? { height : '100%' } : { height : 'auto' } )
434+ ...( props . isInExpandedMode ? { height : '100%' } : props . sx && 'height' in props . sx ? { } : { height : 'auto' } )
439435 } } >
440436 { ! props . isInExpandedMode && < FXButton /> }
441- < div style = { { position : 'relative' , width : '100%' , height : '100%' } } >
437+ < div style = { {
438+ position : 'relative' ,
439+ width : '100%' ,
440+ ...( props . isInExpandedMode || ( props . sx && 'height' in props . sx ) ? { height : '100%' } : { } )
441+ } } >
442442 < div ref = { editorRef } style = { {
443443 border : '1px solid var(--vscode-dropdown-border)' ,
444- ... props . sx ,
445- ... ( props . isInExpandedMode ? { height : '100%' } : { height : 'auto' , maxHeight : '150px' } )
444+ width : '100%' ,
445+ height : '100%'
446446 } } />
447447 { helperPaneState . isOpen &&
448448 < HelperPane
0 commit comments