chore: clear custom attributes on modal close

This commit is contained in:
Aaryan Khandelwal 2023-09-19 17:53:16 +05:30
parent 121d4cb4eb
commit 3b682c2124
2 changed files with 5 additions and 3 deletions

View File

@ -118,6 +118,8 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer(
};
const onClose = () => {
setCustomAttributesList({});
if (!showConfirmDiscard) handleClose();
if (formDirtyState === null) return setActiveProject(null);
const data = JSON.stringify(formDirtyState);
@ -125,6 +127,8 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer(
};
const onDiscardClose = () => {
setCustomAttributesList({});
if (formDirtyState !== null) {
setShowConfirmDiscard(true);
} else {

View File

@ -21,9 +21,7 @@ export interface SidebarProps {
}
const Sidebar: React.FC<SidebarProps> = observer(({ toggleSidebar, setToggleSidebar }) => {
const store: any = useMobxStore();
// theme
const { collapsed: sidebarCollapse } = useTheme();
const store = useMobxStore();
return (
<div