mirror of https://github.com/buster-so/buster.git
rename prop
This commit is contained in:
parent
55751b0468
commit
6818c46578
|
@ -30,7 +30,7 @@ interface ReportEditorProps {
|
||||||
onReady?: (editor: IReportEditor) => void;
|
onReady?: (editor: IReportEditor) => void;
|
||||||
id?: string;
|
id?: string;
|
||||||
mode?: 'export' | 'default';
|
mode?: 'export' | 'default';
|
||||||
children?: React.ReactNode;
|
preEditorChildren?: React.ReactNode;
|
||||||
postEditorChildren?: React.ReactNode;
|
postEditorChildren?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ export const ReportEditor = React.memo(
|
||||||
useFixedToolbarKit = false,
|
useFixedToolbarKit = false,
|
||||||
readOnly = false,
|
readOnly = false,
|
||||||
isStreaming = false,
|
isStreaming = false,
|
||||||
children,
|
preEditorChildren,
|
||||||
postEditorChildren
|
postEditorChildren
|
||||||
},
|
},
|
||||||
ref
|
ref
|
||||||
|
@ -135,7 +135,7 @@ export const ReportEditor = React.memo(
|
||||||
variant={variant}
|
variant={variant}
|
||||||
readOnly={readOnly}
|
readOnly={readOnly}
|
||||||
className={cn('editor-container relative overflow-auto', containerClassName)}>
|
className={cn('editor-container relative overflow-auto', containerClassName)}>
|
||||||
{children}
|
{preEditorChildren}
|
||||||
<ThemeWrapper id={id}>
|
<ThemeWrapper id={id}>
|
||||||
<Editor
|
<Editor
|
||||||
style={style}
|
style={style}
|
||||||
|
|
|
@ -73,19 +73,20 @@ export const ReportPageController: React.FC<{
|
||||||
mode={mode}
|
mode={mode}
|
||||||
onReady={onReadyProp}
|
onReady={onReadyProp}
|
||||||
isStreaming={isStreamingMessage}
|
isStreaming={isStreamingMessage}
|
||||||
|
preEditorChildren={
|
||||||
|
<ReportPageHeader
|
||||||
|
name={report?.name}
|
||||||
|
updatedAt={report?.updated_at}
|
||||||
|
onChangeName={onChangeName}
|
||||||
|
className={commonClassName}
|
||||||
|
isStreaming={isStreamingMessage}
|
||||||
|
/>
|
||||||
|
}
|
||||||
postEditorChildren={
|
postEditorChildren={
|
||||||
showGeneratingContent ? (
|
showGeneratingContent ? (
|
||||||
<GeneratingContent messageId={messageId} className={commonClassName} />
|
<GeneratingContent messageId={messageId} className={commonClassName} />
|
||||||
) : null
|
) : null
|
||||||
}>
|
}></DynamicReportEditor>
|
||||||
<ReportPageHeader
|
|
||||||
name={report?.name}
|
|
||||||
updatedAt={report?.updated_at}
|
|
||||||
onChangeName={onChangeName}
|
|
||||||
className={commonClassName}
|
|
||||||
isStreaming={isStreamingMessage}
|
|
||||||
/>
|
|
||||||
</DynamicReportEditor>
|
|
||||||
) : (
|
) : (
|
||||||
<ReportEditorSkeleton />
|
<ReportEditorSkeleton />
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue