Skip to content

Commit

Permalink
feat: add renderDefault prop in react customLayout component
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Jul 5, 2024
1 parent 2045cf3 commit 1970f0b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type CustomLayoutProps = { componentIndex?: number };

export type CustomLayoutFunctionArg = Partial<CustomRenderFunctionArg> & {
role?: 'custom-layout' | 'header-custom-layout';
renderDefault?: boolean;
};

export const CustomLayout: React.FC<CustomLayoutProps> = (props: PropsWithChildren<CustomLayoutProps>, ref) => {
Expand Down Expand Up @@ -49,7 +50,7 @@ export const CustomLayout: React.FC<CustomLayoutProps> = (props: PropsWithChildr

return {
rootContainer: group,
renderDefault: false
renderDefault: !!children.props.renderDefault
};
},
[children]
Expand Down

0 comments on commit 1970f0b

Please sign in to comment.