mirror of https://github.com/stashapp/stash.git
Fix performer image display (#3767)
* Fix displayed performer image sticking after save * Reset URL before showing dialog in ImageInput
This commit is contained in:
parent
2a85d512f4
commit
3eb805ca2d
|
@ -122,6 +122,11 @@ const PerformerPage: React.FC<IProps> = ({ performer }) => {
|
|||
setRating
|
||||
);
|
||||
|
||||
// reset image if performer changed
|
||||
useEffect(() => {
|
||||
setImage(undefined);
|
||||
}, [performer]);
|
||||
|
||||
// set up hotkeys
|
||||
useEffect(() => {
|
||||
Mousetrap.bind("a", () => setActiveTabKey("details"));
|
||||
|
|
|
@ -53,6 +53,11 @@ export const ImageInput: React.FC<IImageInput> = ({
|
|||
);
|
||||
}
|
||||
|
||||
function showDialog() {
|
||||
setURL("");
|
||||
setIsShowDialog(true);
|
||||
}
|
||||
|
||||
function onConfirmURL() {
|
||||
if (!onImageURL) {
|
||||
return;
|
||||
|
@ -112,7 +117,7 @@ export const ImageInput: React.FC<IImageInput> = ({
|
|||
</Form.Label>
|
||||
</div>
|
||||
<div>
|
||||
<Button className="minimal" onClick={() => setIsShowDialog(true)}>
|
||||
<Button className="minimal" onClick={showDialog}>
|
||||
<Icon icon={faLink} className="fa-fw" />
|
||||
<span>{intl.formatMessage({ id: "actions.from_url" })}</span>
|
||||
</Button>
|
||||
|
|
Loading…
Reference in New Issue