mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 09:58:14 +00:00
parent
1be3dfdd0a
commit
fb73e925e7
@ -1,4 +1,8 @@
|
||||
import { EditableSchemaFieldInfo, SchemaFieldEntity } from '../../../../../../../types.generated';
|
||||
import {
|
||||
EditableSchemaFieldInfo,
|
||||
SchemaFieldEntity,
|
||||
DocumentationAssociation,
|
||||
} from '../../../../../../../types.generated';
|
||||
|
||||
interface Props {
|
||||
schemaFieldEntity?: SchemaFieldEntity | null;
|
||||
@ -8,7 +12,7 @@ interface Props {
|
||||
|
||||
export function getFieldDescriptionDetails({ schemaFieldEntity, editableFieldInfo, defaultDescription }: Props) {
|
||||
const documentations = schemaFieldEntity?.documentation?.documentations;
|
||||
let latestDocumentation: typeof documentations[0] | undefined;
|
||||
let latestDocumentation: DocumentationAssociation | undefined;
|
||||
|
||||
if (documentations && documentations.length > 0) {
|
||||
latestDocumentation = documentations.reduce((latest, current) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user