mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Merge branch 'features/media-lib' of github.com:strapi/strapi into features/media-lib
This commit is contained in:
commit
e8bac9c9a9
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
||||
import { get } from 'lodash';
|
||||
@ -32,6 +32,10 @@ const InputMedia = ({ label, onChange, name, attribute, value, type }) => {
|
||||
const displaySlidePagination =
|
||||
attribute.multiple && value.length > 1 ? ` (${fileToDisplay + 1}/${value.length})` : '';
|
||||
|
||||
useEffect(() => {
|
||||
setFileToDisplay(0);
|
||||
}, [modal.isOpen]);
|
||||
|
||||
const handleClickToggleModal = () => {
|
||||
setModal(prev => ({ isDisplayed: true, step: 'list', isOpen: !prev.isOpen, fileToEdit: null }));
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user