mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-19 06:38:04 +00:00
fix(ui): Schema tab -- Fixed the header issue (#5622)
This commit is contained in:
parent
126235a51f
commit
6b819e966c
@ -20,6 +20,10 @@ const NoSchema = styled(Empty)`
|
|||||||
padding-top: 60px;
|
padding-top: 60px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const SchemaTableContainer = styled.div`
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
`;
|
||||||
export const SchemaTab = ({ properties }: { properties?: any }) => {
|
export const SchemaTab = ({ properties }: { properties?: any }) => {
|
||||||
const { entityData } = useEntityData();
|
const { entityData } = useEntityData();
|
||||||
const baseEntity = useBaseEntity<GetDatasetQuery>();
|
const baseEntity = useBaseEntity<GetDatasetQuery>();
|
||||||
@ -120,7 +124,7 @@ export const SchemaTab = ({ properties }: { properties?: any }) => {
|
|||||||
(getSchemaBlameData?.getSchemaBlame?.schemaFieldBlameList as Array<SchemaFieldBlame>) || [];
|
(getSchemaBlameData?.getSchemaBlame?.schemaFieldBlameList as Array<SchemaFieldBlame>) || [];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<SchemaHeader
|
<SchemaHeader
|
||||||
editMode={editMode}
|
editMode={editMode}
|
||||||
showRaw={showRaw}
|
showRaw={showRaw}
|
||||||
@ -136,30 +140,32 @@ export const SchemaTab = ({ properties }: { properties?: any }) => {
|
|||||||
showSchemaAuditView={showSchemaAuditView}
|
showSchemaAuditView={showSchemaAuditView}
|
||||||
setShowSchemaAuditView={setShowSchemaAuditView}
|
setShowSchemaAuditView={setShowSchemaAuditView}
|
||||||
/>
|
/>
|
||||||
{/* eslint-disable-next-line no-nested-ternary */}
|
<SchemaTableContainer>
|
||||||
{showRaw ? (
|
{/* eslint-disable-next-line no-nested-ternary */}
|
||||||
<SchemaRawView
|
{showRaw ? (
|
||||||
schemaDiff={{ current: schemaMetadata }}
|
<SchemaRawView
|
||||||
editMode={editMode}
|
schemaDiff={{ current: schemaMetadata }}
|
||||||
showKeySchema={showKeySchema}
|
editMode={editMode}
|
||||||
/>
|
showKeySchema={showKeySchema}
|
||||||
) : rows && rows.length > 0 ? (
|
/>
|
||||||
<>
|
) : rows && rows.length > 0 ? (
|
||||||
<SchemaEditableContext.Provider value={editMode}>
|
<>
|
||||||
<SchemaTable
|
<SchemaEditableContext.Provider value={editMode}>
|
||||||
schemaMetadata={schemaMetadata}
|
<SchemaTable
|
||||||
rows={rows}
|
schemaMetadata={schemaMetadata}
|
||||||
editMode={editMode}
|
rows={rows}
|
||||||
editableSchemaMetadata={editableSchemaMetadata}
|
editMode={editMode}
|
||||||
usageStats={usageStats}
|
editableSchemaMetadata={editableSchemaMetadata}
|
||||||
schemaFieldBlameList={schemaFieldBlameList}
|
usageStats={usageStats}
|
||||||
showSchemaAuditView={showSchemaAuditView}
|
schemaFieldBlameList={schemaFieldBlameList}
|
||||||
/>
|
showSchemaAuditView={showSchemaAuditView}
|
||||||
</SchemaEditableContext.Provider>
|
/>
|
||||||
</>
|
</SchemaEditableContext.Provider>
|
||||||
) : (
|
</>
|
||||||
<NoSchema />
|
) : (
|
||||||
)}
|
<NoSchema />
|
||||||
</div>
|
)}
|
||||||
|
</SchemaTableContainer>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user