mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Refresh marker panel on marker create (#2502)
* Update scene markers on create * Improve display of markers without titles * Fix marker title not populating
This commit is contained in:
@@ -382,6 +382,16 @@ export const MarkerTitleSuggest: React.FC<IMarkerSuggestProps> = (props) => {
|
||||
value: item?.title ?? "",
|
||||
}));
|
||||
const initialIds = props.initialMarkerTitle ? [props.initialMarkerTitle] : [];
|
||||
|
||||
// add initial value to items if still loading, to ensure existing value
|
||||
// is populated
|
||||
if (loading && initialIds.length > 0) {
|
||||
items.push({
|
||||
label: initialIds[0],
|
||||
value: initialIds[0],
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<SelectComponent
|
||||
isMulti={false}
|
||||
|
||||
Reference in New Issue
Block a user