fix: No maxLength label is displayed for arrays of items #1701

This commit is contained in:
Andriy Zaleskyy 2021-10-08 13:44:54 +03:00
parent bccd21394e
commit 543ecc4d39

View File

@ -26,6 +26,7 @@ import { l } from '../../services/Labels';
import { OptionsContext } from '../OptionsProvider';
import { FieldModel } from '../../services/models/Field';
import styled from '../../styled-components';
import { ArraySchema } from '../Schema';
const MAX_PATTERN_LENGTH = 45;
@ -63,11 +64,19 @@ export class FieldDetails extends React.PureComponent<FieldProps, { patternShown
}
}
return (
<div>
<div>
{schema.type === 'array' ?
<ArraySchema schema={schema}/>
:
(<>
<TypePrefix>{schema.typePrefix}</TypePrefix>
<TypeName>{schema.displayType}</TypeName>
</>
)
}
{schema.displayFormat && (
<TypeFormat>
{' '}