fix: also submit current label when changing screenshot image
This commit is contained in:
parent
18832c69cc
commit
8ba7214718
|
@ -278,9 +278,9 @@ const ScreenshotInput: StreamfieldComponent<Screenshot> = ({ value, onChange })
|
|||
const height = attachment?.meta?.getIn(['original', 'height']);
|
||||
|
||||
if (typeof width === 'number' && typeof height === 'number') {
|
||||
onChange({ ...value, [key]: attachment.get('url'), ['sizes']: `${width}x${height}` });
|
||||
onChange({ ...value, [key]: attachment.get('url'), ['sizes']: `${width}x${height}`, 'label': value.label });
|
||||
} else {
|
||||
onChange({ ...value, [key]: attachment.get('url') });
|
||||
onChange({ ...value, [key]: attachment.get('url'), 'label': value.label });
|
||||
}
|
||||
|
||||
toast.success(messages.upload_screenshot_success);
|
||||
|
|
Loading…
Reference in New Issue