@@ -11,14 +11,15 @@ import { BackgroundColorContext } from "comps/utils/backgroundColorContext";
11
11
import { trans } from "i18n" ;
12
12
import _ from "lodash" ;
13
13
import { ConstructorToView , wrapChildAction } from "lowcoder-core" ;
14
- import { useContext } from "react" ;
14
+ import { createContext , useContext } from "react" ;
15
15
import { tryToNumber } from "util/convertUtils" ;
16
16
import { SimpleContainerComp } from "../containerBase/simpleContainerComp" ;
17
17
import { OB_ROW_ORI_INDEX , RecordType } from "./tableUtils" ;
18
18
import { NameGenerator } from "comps/utils" ;
19
19
import { JSONValue } from "util/jsonTypes" ;
20
20
21
21
const ContextSlotControl = withSelectedMultiContext ( SlotControl ) ;
22
+ export const ExpandViewContext = createContext ( false ) ;
22
23
23
24
const ContainerView = ( props : ContainerBaseProps ) => {
24
25
return < InnerGrid { ...props } emptyRows = { 15 } autoHeight /> ;
@@ -85,7 +86,11 @@ export class ExpansionControl extends ExpansionControlTmp {
85
86
String ( record [ OB_ROW_ORI_INDEX ] )
86
87
) ;
87
88
const containerProps = slotControl . children . container . getView ( ) ;
88
- return < ExpandView key = { record [ OB_ROW_ORI_INDEX ] } containerProps = { containerProps } /> ;
89
+ return (
90
+ < ExpandViewContext . Provider value = { true } >
91
+ < ExpandView key = { record [ OB_ROW_ORI_INDEX ] } containerProps = { containerProps } />
92
+ </ ExpandViewContext . Provider >
93
+ ) ;
89
94
} ,
90
95
} ,
91
96
expandModalView : selectedContainer . getView ( ) ,
0 commit comments