mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Select first result when selectedResult is not defined (#4770)
This commit is contained in:
@@ -827,7 +827,7 @@ export const SceneSearchResults: React.FC<ISceneSearchResults> = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// #3198 - if the selected result is no longer in the list, reset it
|
// #3198 - if the selected result is no longer in the list, reset it
|
||||||
if (selectedResult && scenes?.length <= selectedResult) {
|
if (!selectedResult || scenes?.length <= selectedResult) {
|
||||||
if (!scenes) {
|
if (!scenes) {
|
||||||
setSelectedResult(undefined);
|
setSelectedResult(undefined);
|
||||||
} else if (scenes.length > 0 && scenes[0].resolved) {
|
} else if (scenes.length > 0 && scenes[0].resolved) {
|
||||||
|
|||||||
Reference in New Issue
Block a user