clear last selected on selection clear
This commit is contained in:
parent
7569813a1a
commit
500c91d431
|
@ -222,6 +222,12 @@ const PhotoFrame = ({
|
||||||
setFetching({});
|
setFetching({});
|
||||||
}, [files, search, deleted]);
|
}, [files, search, deleted]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (selected.count === 0) {
|
||||||
|
setLastSelected(null);
|
||||||
|
}
|
||||||
|
}, [selected]);
|
||||||
|
|
||||||
const updateUrl = (index: number) => (url: string) => {
|
const updateUrl = (index: number) => (url: string) => {
|
||||||
files[index] = {
|
files[index] = {
|
||||||
...files[index],
|
...files[index],
|
||||||
|
|
Loading…
Reference in a new issue