From 1970f0bccfcb180d3b28db81baf426fb343575aa Mon Sep 17 00:00:00 2001 From: Rui-Sun Date: Fri, 5 Jul 2024 10:54:07 +0800 Subject: [PATCH] feat: add renderDefault prop in react customLayout component --- packages/react-vtable/src/components/custom/custom-layout.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-vtable/src/components/custom/custom-layout.tsx b/packages/react-vtable/src/components/custom/custom-layout.tsx index f6ef5838e..936c0900b 100644 --- a/packages/react-vtable/src/components/custom/custom-layout.tsx +++ b/packages/react-vtable/src/components/custom/custom-layout.tsx @@ -13,6 +13,7 @@ type CustomLayoutProps = { componentIndex?: number }; export type CustomLayoutFunctionArg = Partial & { role?: 'custom-layout' | 'header-custom-layout'; + renderDefault?: boolean; }; export const CustomLayout: React.FC = (props: PropsWithChildren, ref) => { @@ -49,7 +50,7 @@ export const CustomLayout: React.FC = (props: PropsWithChildr return { rootContainer: group, - renderDefault: false + renderDefault: !!children.props.renderDefault }; }, [children]