mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 00:26:34 +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 { OptionsContext } from '../OptionsProvider';
|
||||||
import { FieldModel } from '../../services/models/Field';
|
import { FieldModel } from '../../services/models/Field';
|
||||||
import styled from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
|
import { ArraySchema } from '../Schema';
|
||||||
|
|
||||||
const MAX_PATTERN_LENGTH = 45;
|
const MAX_PATTERN_LENGTH = 45;
|
||||||
|
|
||||||
|
@ -63,11 +64,19 @@ export class FieldDetails extends React.PureComponent<FieldProps, { patternShown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
{schema.type === 'array' ?
|
||||||
<TypeName>{schema.displayType}</TypeName>
|
<ArraySchema schema={schema}/>
|
||||||
|
:
|
||||||
|
(<>
|
||||||
|
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
||||||
|
<TypeName>{schema.displayType}</TypeName>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
{schema.displayFormat && (
|
{schema.displayFormat && (
|
||||||
<TypeFormat>
|
<TypeFormat>
|
||||||
{' '}
|
{' '}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user