mirror of
https://github.com/strapi/strapi.git
synced 2025-11-07 05:38:13 +00:00
Merge pull request #20541 from strapi/fix/multi-media
fix: multiple is only available in attribute now
This commit is contained in:
commit
ef63271a8c
@ -20,7 +20,7 @@ const STEPS = {
|
|||||||
|
|
||||||
export const MediaLibraryInput = forwardRef(
|
export const MediaLibraryInput = forwardRef(
|
||||||
(
|
(
|
||||||
{ attribute: { allowedTypes }, label, hint, disabled, labelAction, multiple, name, required },
|
{ attribute: { allowedTypes, multiple }, label, hint, disabled, labelAction, name, required },
|
||||||
forwardedRef
|
forwardedRef
|
||||||
) => {
|
) => {
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
@ -217,22 +217,24 @@ export const MediaLibraryInput = forwardRef(
|
|||||||
);
|
);
|
||||||
|
|
||||||
MediaLibraryInput.defaultProps = {
|
MediaLibraryInput.defaultProps = {
|
||||||
attribute: { allowedTypes: ['videos', 'files', 'images', 'audios'] },
|
attribute: { allowedTypes: ['videos', 'files', 'images', 'audios'], multiple: false },
|
||||||
disabled: false,
|
disabled: false,
|
||||||
hint: undefined,
|
hint: undefined,
|
||||||
label: undefined,
|
label: undefined,
|
||||||
labelAction: undefined,
|
labelAction: undefined,
|
||||||
multiple: false,
|
|
||||||
required: false,
|
required: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
MediaLibraryInput.propTypes = {
|
MediaLibraryInput.propTypes = {
|
||||||
attribute: PropTypes.shape({ allowedTypes: PropTypes.arrayOf(PropTypes.string) }),
|
attribute: PropTypes.shape({
|
||||||
|
allowedTypes: PropTypes.arrayOf(PropTypes.string),
|
||||||
|
multiple: PropTypes.bool,
|
||||||
|
}),
|
||||||
disabled: PropTypes.bool,
|
disabled: PropTypes.bool,
|
||||||
hint: PropTypes.string,
|
hint: PropTypes.string,
|
||||||
label: PropTypes.string,
|
label: PropTypes.string,
|
||||||
labelAction: PropTypes.node,
|
labelAction: PropTypes.node,
|
||||||
multiple: PropTypes.bool,
|
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
required: PropTypes.bool,
|
required: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user