@@ -11,14 +11,15 @@ import { BackgroundColorContext } from "comps/utils/backgroundColorContext";
1111import { trans } from "i18n" ;
1212import _ from "lodash" ;
1313import { ConstructorToView , wrapChildAction } from "lowcoder-core" ;
14- import { useContext } from "react" ;
14+ import { createContext , useContext } from "react" ;
1515import { tryToNumber } from "util/convertUtils" ;
1616import { SimpleContainerComp } from "../containerBase/simpleContainerComp" ;
1717import { OB_ROW_ORI_INDEX , RecordType } from "./tableUtils" ;
1818import { NameGenerator } from "comps/utils" ;
1919import { JSONValue } from "util/jsonTypes" ;
2020
2121const ContextSlotControl = withSelectedMultiContext ( SlotControl ) ;
22+ export const ExpandViewContext = createContext ( false ) ;
2223
2324const ContainerView = ( props : ContainerBaseProps ) => {
2425 return < InnerGrid { ...props } emptyRows = { 15 } autoHeight /> ;
@@ -85,7 +86,11 @@ export class ExpansionControl extends ExpansionControlTmp {
8586 String ( record [ OB_ROW_ORI_INDEX ] )
8687 ) ;
8788 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+ ) ;
8994 } ,
9095 } ,
9196 expandModalView : selectedContainer . getView ( ) ,
0 commit comments