mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
chore: remove workspace toggle from issue parent modal (#6227)
This commit is contained in:
committed by
GitHub
parent
6214c09170
commit
44d8de1169
@@ -9,7 +9,7 @@ import { Combobox, Dialog, Transition } from "@headlessui/react";
|
||||
// types
|
||||
import { ISearchIssueResponse } from "@plane/types";
|
||||
// ui
|
||||
import { Loader, ToggleSwitch, Tooltip } from "@plane/ui";
|
||||
import { Loader } from "@plane/ui";
|
||||
// components
|
||||
import { IssueSearchModalEmptyState } from "@/components/core";
|
||||
// helpers
|
||||
@@ -48,7 +48,6 @@ export const ParentIssuesListModal: React.FC<Props> = ({
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
const [issues, setIssues] = useState<ISearchIssueResponse[]>([]);
|
||||
const [isSearching, setIsSearching] = useState(false);
|
||||
const [isWorkspaceLevel, setIsWorkspaceLevel] = useState(false);
|
||||
const { isMobile } = usePlatformOS();
|
||||
const debouncedSearchTerm: string = useDebounce(searchTerm, 500);
|
||||
|
||||
@@ -59,7 +58,6 @@ export const ParentIssuesListModal: React.FC<Props> = ({
|
||||
const handleClose = () => {
|
||||
onClose();
|
||||
setSearchTerm("");
|
||||
setIsWorkspaceLevel(false);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -73,7 +71,7 @@ export const ParentIssuesListModal: React.FC<Props> = ({
|
||||
search: debouncedSearchTerm,
|
||||
parent: true,
|
||||
issue_id: issueId,
|
||||
workspace_search: isWorkspaceLevel,
|
||||
workspace_search: false,
|
||||
epic: searchEpic ? true : undefined,
|
||||
})
|
||||
.then((res) => setIssues(res))
|
||||
@@ -81,7 +79,7 @@ export const ParentIssuesListModal: React.FC<Props> = ({
|
||||
setIsSearching(false);
|
||||
setIsLoading(false);
|
||||
});
|
||||
}, [debouncedSearchTerm, isOpen, issueId, isWorkspaceLevel, projectId, workspaceSlug]);
|
||||
}, [debouncedSearchTerm, isOpen, issueId, projectId, workspaceSlug]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -131,28 +129,6 @@ export const ParentIssuesListModal: React.FC<Props> = ({
|
||||
tabIndex={baseTabIndex}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex p-2 sm:justify-end">
|
||||
<Tooltip tooltipContent="Toggle workspace level search" isMobile={isMobile}>
|
||||
<div
|
||||
className={`flex flex-shrink-0 cursor-pointer items-center gap-1 text-xs ${
|
||||
isWorkspaceLevel ? "text-custom-text-100" : "text-custom-text-200"
|
||||
}`}
|
||||
>
|
||||
<ToggleSwitch
|
||||
value={isWorkspaceLevel}
|
||||
onChange={() => setIsWorkspaceLevel((prevData) => !prevData)}
|
||||
label="Workspace level"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setIsWorkspaceLevel((prevData) => !prevData)}
|
||||
className="flex-shrink-0"
|
||||
>
|
||||
Workspace Level
|
||||
</button>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<Combobox.Options
|
||||
static
|
||||
className="max-h-80 scroll-py-2 overflow-y-auto vertical-scrollbar scrollbar-md"
|
||||
|
||||
Reference in New Issue
Block a user