File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export interface ReplProps {
42
42
current : string ;
43
43
setCurrent : ( tabId : string ) => void ;
44
44
onEditorReady ?: ( editor : mEditor . IStandaloneCodeEditor ) => unknown ;
45
+ ref ?: HTMLDivElement | ( ( el : HTMLDivElement ) => void ) ;
45
46
}
46
47
47
48
export const Repl : Component < ReplProps > = ( props ) => {
@@ -263,7 +264,12 @@ export const Repl: Component<ReplProps> = (props) => {
263
264
264
265
return (
265
266
< div
266
- ref = { ( el ) => setGrid ( el ) }
267
+ ref = { ( el ) => {
268
+ setGrid ( el ) ;
269
+ if ( props . ref ) {
270
+ ( props . ref as ( el : HTMLDivElement ) => void ) ( el ) ;
271
+ }
272
+ } }
267
273
class = "relative grid bg-blueGray-50 h-full overflow-hidden text-blueGray-900 dark:text-blueGray-50 font-sans"
268
274
classList = { {
269
275
'wrapper--forced' : props . isHorizontal ,
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export declare const Repl: Component<{
16
16
current : string ;
17
17
setCurrent : ( tabId : string ) => void ;
18
18
onEditorReady ?: ( editor : mEditor . IStandaloneCodeEditor ) => unknown ;
19
+ ref ?: HTMLDivElement | ( ( el : HTMLDivElement ) => void ) ;
19
20
} > ;
20
21
21
22
export interface Tab {
You can’t perform that action at this time.
0 commit comments