mirror of
https://github.com/stashapp/stash.git
synced 2026-01-30 03:52:00 +01:00
FR: Autopopulate Stash-ID Search Box (#6447)
This commit is contained in:
parent
45dc892a54
commit
81e8ccb5a9
5 changed files with 7 additions and 1 deletions
|
|
@ -681,6 +681,7 @@ export const PerformerEditPanel: React.FC<IPerformerDetails> = ({
|
|||
onStashIDSelected(item);
|
||||
setIsStashIDSearchOpen(false);
|
||||
}}
|
||||
initialQuery={performer.name ?? ""}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -731,6 +731,7 @@ export const SceneEditPanel: React.FC<IProps> = ({
|
|||
onStashIDSelected(item);
|
||||
setIsStashIDSearchOpen(false);
|
||||
}}
|
||||
initialQuery={scene.title ?? ""}
|
||||
/>
|
||||
)}
|
||||
<Form noValidate onSubmit={formik.handleSubmit}>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ interface IProps {
|
|||
stashBoxes: GQL.StashBox[];
|
||||
excludedStashBoxEndpoints?: string[];
|
||||
onSelectItem: (item?: GQL.StashIdInput) => void;
|
||||
initialQuery?: string;
|
||||
}
|
||||
|
||||
const CLASSNAME = "StashBoxIDSearchModal";
|
||||
|
|
@ -289,6 +290,7 @@ export const StashBoxIDSearchModal: React.FC<IProps> = ({
|
|||
stashBoxes,
|
||||
excludedStashBoxEndpoints = [],
|
||||
onSelectItem,
|
||||
initialQuery = "",
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const Toast = useToast();
|
||||
|
|
@ -297,7 +299,7 @@ export const StashBoxIDSearchModal: React.FC<IProps> = ({
|
|||
const [selectedStashBox, setSelectedStashBox] = useState<GQL.StashBox | null>(
|
||||
null
|
||||
);
|
||||
const [query, setQuery] = useState<string>("");
|
||||
const [query, setQuery] = useState<string>(initialQuery);
|
||||
const [results, setResults] = useState<SearchResultItem[] | undefined>(
|
||||
undefined
|
||||
);
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ export const StudioEditPanel: React.FC<IStudioEditPanel> = ({
|
|||
onStashIDSelected(item);
|
||||
setIsStashIDSearchOpen(false);
|
||||
}}
|
||||
initialQuery={studio.name ?? ""}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -213,6 +213,7 @@ export const TagEditPanel: React.FC<ITagEditPanel> = ({
|
|||
onStashIDSelected(item);
|
||||
setIsStashIDSearchOpen(false);
|
||||
}}
|
||||
initialQuery={tag?.name ?? ""}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue