Merge pull request #13438 from strapi/features/ML-folder-select-all

ML: Fix bulk action "select all"
This commit is contained in:
Gustav Hansen 2022-06-01 10:23:29 +02:00 committed by GitHub
commit 1bcd0e49c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,12 @@ export const MediaLibrary = () => {
(assetCount > 0 || folderCount > 0) &&
selected.length === assetCount + folderCount
}
onChange={() => selectAll([assets, folders])}
onChange={() => {
selectAll([
...assets.map(asset => ({ ...asset, type: 'asset' })),
...folders.map(folder => ({ ...folder, type: 'folder' })),
]);
}}
/>
</BoxWithHeight>
)}