mirror of
https://github.com/stashapp/stash.git
synced 2025-12-07 17:02:38 +01:00
Fix tag select breaking layout
This commit is contained in:
parent
82f4a8f671
commit
a20fbe33c0
2 changed files with 10 additions and 15 deletions
|
|
@ -54,13 +54,13 @@ function sortTagsByRelevance(input: string, tags: FindTagsResult) {
|
||||||
|
|
||||||
const tagSelectSort = PatchFunction("TagSelect.sort", sortTagsByRelevance);
|
const tagSelectSort = PatchFunction("TagSelect.sort", sortTagsByRelevance);
|
||||||
|
|
||||||
const _TagSelect: React.FC<
|
export type TagSelectProps = IFilterProps &
|
||||||
IFilterProps &
|
IFilterValueProps<Tag> & {
|
||||||
IFilterValueProps<Tag> & {
|
hoverPlacement?: Placement;
|
||||||
hoverPlacement?: Placement;
|
excludeIds?: string[];
|
||||||
excludeIds?: string[];
|
};
|
||||||
}
|
|
||||||
> = (props) => {
|
const _TagSelect: React.FC<TagSelectProps> = (props) => {
|
||||||
const [createTag] = useTagCreate();
|
const [createTag] = useTagCreate();
|
||||||
|
|
||||||
const { configuration } = React.useContext(ConfigurationContext);
|
const { configuration } = React.useContext(ConfigurationContext);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as GQL from "src/core/generated-graphql";
|
import * as GQL from "src/core/generated-graphql";
|
||||||
import { useTagCreate } from "src/core/StashService";
|
import { useTagCreate } from "src/core/StashService";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Tag, TagSelect } from "src/components/Tags/TagSelect";
|
import { Tag, TagSelect, TagSelectProps } from "src/components/Tags/TagSelect";
|
||||||
import { useToast } from "src/hooks/Toast";
|
import { useToast } from "src/hooks/Toast";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
import { Badge, Button } from "react-bootstrap";
|
import { Badge, Button } from "react-bootstrap";
|
||||||
|
|
@ -125,15 +125,10 @@ export function useTagsEdit(
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
function tagsControl() {
|
function tagsControl(props?: TagSelectProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TagSelect
|
<TagSelect isMulti onSelect={onSetTags} values={tags} {...props} />
|
||||||
menuPortalTarget={document.body}
|
|
||||||
isMulti
|
|
||||||
onSelect={onSetTags}
|
|
||||||
values={tags}
|
|
||||||
/>
|
|
||||||
{renderNewTags()}
|
{renderNewTags()}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue