mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-21 16:16:33 +03:00
fix: No maxLength label is displayed for arrays of items #1701
This commit is contained in:
parent
bccd21394e
commit
543ecc4d39
|
@ -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>
|
||||
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
||||
<TypeName>{schema.displayType}</TypeName>
|
||||
{schema.type === 'array' ?
|
||||
<ArraySchema schema={schema}/>
|
||||
:
|
||||
(<>
|
||||
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
||||
<TypeName>{schema.displayType}</TypeName>
|
||||
</>
|
||||
)
|
||||
}
|
||||
{schema.displayFormat && (
|
||||
<TypeFormat>
|
||||
{' '}
|
||||
|
|
Loading…
Reference in New Issue
Block a user