forked from github/plane
fix: bug fixes (#3010)
* fix: project view modal auto close bug fix * fix: issue peek overview label select permission validation added
This commit is contained in:
parent
06ffcd67d1
commit
87dffe26c2
@ -4,8 +4,6 @@ import { Plus } from "lucide-react";
|
||||
// mobx store
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
// components
|
||||
import { CreateUpdateProjectViewModal } from "components/views";
|
||||
// components
|
||||
import { Breadcrumbs, PhotoFilterIcon, Button } from "@plane/ui";
|
||||
// helpers
|
||||
import { renderEmoji } from "helpers/emoji.helper";
|
||||
@ -13,21 +11,13 @@ import { renderEmoji } from "helpers/emoji.helper";
|
||||
export const ProjectViewsHeader: React.FC = observer(() => {
|
||||
// router
|
||||
const router = useRouter();
|
||||
const { workspaceSlug, projectId } = router.query;
|
||||
const { workspaceSlug } = router.query;
|
||||
|
||||
const { project: projectStore, commandPalette } = useMobxStore();
|
||||
const { currentProjectDetails } = projectStore;
|
||||
|
||||
return (
|
||||
<>
|
||||
{workspaceSlug && projectId && (
|
||||
<CreateUpdateProjectViewModal
|
||||
isOpen={commandPalette.isCreateViewModalOpen}
|
||||
onClose={() => commandPalette.toggleCreateViewModal(false)}
|
||||
workspaceSlug={workspaceSlug.toString()}
|
||||
projectId={projectId.toString()}
|
||||
/>
|
||||
)}
|
||||
<div className="relative flex w-full flex-shrink-0 flex-row z-10 h-[3.75rem] items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4">
|
||||
<div className="flex items-center gap-2 flex-grow w-full whitespace-nowrap overflow-ellipsis">
|
||||
<div>
|
||||
|
@ -17,10 +17,11 @@ type Props = {
|
||||
onChange: (value: string[]) => void;
|
||||
projectId: string;
|
||||
label?: JSX.Element;
|
||||
disabled?: boolean;
|
||||
};
|
||||
|
||||
export const IssueLabelSelect: React.FC<Props> = observer((props) => {
|
||||
const { setIsOpen, value, onChange, projectId, label } = props;
|
||||
const { setIsOpen, value, onChange, projectId, label, disabled = false } = props;
|
||||
|
||||
// states
|
||||
const [query, setQuery] = useState("");
|
||||
@ -50,7 +51,14 @@ export const IssueLabelSelect: React.FC<Props> = observer((props) => {
|
||||
query === "" ? issueLabels : issueLabels?.filter((l) => l.name.toLowerCase().includes(query.toLowerCase()));
|
||||
|
||||
return (
|
||||
<Combobox as="div" value={value} onChange={(val) => onChange(val)} className="relative flex-shrink-0" multiple>
|
||||
<Combobox
|
||||
as="div"
|
||||
value={value}
|
||||
onChange={(val) => onChange(val)}
|
||||
className="relative flex-shrink-0"
|
||||
multiple
|
||||
disabled={disabled}
|
||||
>
|
||||
{({ open }: any) => (
|
||||
<>
|
||||
<Combobox.Button as={Fragment}>
|
||||
|
@ -125,6 +125,7 @@ export const SidebarLabelSelect: React.FC<Props> = observer((props) => {
|
||||
Select Label
|
||||
</span>
|
||||
}
|
||||
disabled={uneditable}
|
||||
/>
|
||||
{!isNotAllowed && (
|
||||
<button
|
||||
|
Loading…
Reference in New Issue
Block a user