Do not reset description field while uploading thumbnail in playlist edit/publish form; use same upload thumbnail layout as file upload for playlist edit/publish.

This commit is contained in:
Franco Montenegro 2022-04-26 08:52:48 -03:00 committed by jessopb
parent 562e154675
commit 34ea712874
2 changed files with 4 additions and 1 deletions

View file

@ -362,6 +362,7 @@ function CollectionForm(props: Props) {
thumbnailParamError={thumbError}
thumbnailParamStatus={thumbStatus}
updateThumbnailParams={handleUpdateThumbnail}
usePublishFormMode
/>
</fieldset-section>
<FormField

View file

@ -26,6 +26,7 @@ type Props = {
updatePublishForm: ({}) => void,
updateThumbnailParams: ({}) => void,
resetThumbnailStatus: () => void,
usePublishFormMode: boolean,
};
function SelectThumbnail(props: Props) {
@ -42,9 +43,10 @@ function SelectThumbnail(props: Props) {
updateThumbnailParams,
thumbnailPath,
resetThumbnailStatus,
usePublishFormMode,
} = props;
const publishForm = !updateThumbnailParams;
const publishForm = usePublishFormMode || !updateThumbnailParams;
const thumbnail = publishForm ? props.thumbnail : thumbnailParam;
const thumbnailError = publishForm ? props.thumbnailError : props.thumbnailParamError;