fix(ui): preselect folder when bulk uploading from inside a folder#16030
fix(ui): preselect folder when bulk uploading from inside a folder#16030aqib-io wants to merge 2 commits intopayloadcms:mainfrom
Conversation
Good catch. updated folderID to optional. Thanks for the review! |
Thanks! Confirmed — setFolderID(undefined) resets the state when the drawer closes, and on the next open, ListBulkUploadButton sets the fresh folderID from useFolder() before opening the modal. So if the user navigates to a different folder and opens bulk upload again, it picks up the new folder correctly. |
What?
Preselect the current folder when triggering bulk upload from inside a folder view.
Why?
When bulk uploading from inside a folder, all files show "No Folder" instead of the current folder. Users have to manually assign each file to the folder, which is tedious and easy to miss. See #15647
How?
folderIDtoBulkUploadContextto pass folder state from the button to the drawerListBulkUploadButton, readfolderIDfromuseFolder()and set it on the context when opening bulk uploadFormsManager, inject thefolderIDinto each form's initial state so the folder field is pre-populatedFixes #15647