mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Place popover to right on edit pages (#3939)
This commit is contained in:
@@ -31,6 +31,7 @@ import { galleryTitle } from "src/core/galleries";
|
||||
import { TagPopover } from "../Tags/TagPopover";
|
||||
import { defaultMaxOptionsShown, IUIConfig } from "src/core/config";
|
||||
import { useDebouncedSetState } from "src/hooks/debounce";
|
||||
import { Placement } from "react-bootstrap/esm/Overlay";
|
||||
|
||||
export type SelectObject = {
|
||||
id: string;
|
||||
@@ -832,9 +833,9 @@ export const MovieSelect: React.FC<IFilterProps> = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const TagSelect: React.FC<IFilterProps & { excludeIds?: string[] }> = (
|
||||
props
|
||||
) => {
|
||||
export const TagSelect: React.FC<
|
||||
IFilterProps & { excludeIds?: string[]; hoverPlacement?: Placement }
|
||||
> = (props) => {
|
||||
const [tagAliases, setTagAliases] = useState<Record<string, string[]>>({});
|
||||
const [allAliases, setAllAliases] = useState<string[]>([]);
|
||||
const { data, loading } = useAllTagsForFilter();
|
||||
@@ -890,7 +891,7 @@ export const TagSelect: React.FC<IFilterProps & { excludeIds?: string[] }> = (
|
||||
: optionProps.data.value;
|
||||
|
||||
return (
|
||||
<TagPopover id={id}>
|
||||
<TagPopover id={id} placement={props.hoverPlacement}>
|
||||
<reactSelectComponents.Option {...thisOptionProps} />
|
||||
</TagPopover>
|
||||
);
|
||||
|
||||
@@ -15,6 +15,7 @@ import { galleryTitle } from "src/core/galleries";
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { TagPopover } from "../Tags/TagPopover";
|
||||
import { markerTitle } from "src/core/markers";
|
||||
import { Placement } from "react-bootstrap/esm/Overlay";
|
||||
|
||||
interface IFile {
|
||||
path: string;
|
||||
@@ -40,6 +41,7 @@ interface IProps {
|
||||
scene?: Partial<Pick<SceneDataFragment, "id" | "title" | "files">>;
|
||||
gallery?: Partial<IGallery>;
|
||||
className?: string;
|
||||
hoverPlacement?: Placement;
|
||||
}
|
||||
|
||||
export const TagLink: React.FC<IProps> = (props: IProps) => {
|
||||
@@ -84,7 +86,7 @@ export const TagLink: React.FC<IProps> = (props: IProps) => {
|
||||
}
|
||||
return (
|
||||
<Badge className={cx("tag-item", props.className)} variant="secondary">
|
||||
<TagPopover id={id}>
|
||||
<TagPopover id={id} placement={props.hoverPlacement}>
|
||||
<Link to={link}>{title}</Link>
|
||||
</TagPopover>
|
||||
</Badge>
|
||||
|
||||
Reference in New Issue
Block a user