+
{child}
{index !== React.Children.count(children) - 1 && (
diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx
index cc8590159..74556c33b 100644
--- a/packages/ui/src/dropdowns/custom-menu.tsx
+++ b/packages/ui/src/dropdowns/custom-menu.tsx
@@ -66,6 +66,11 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
};
const handleKeyDown = useDropdownKeyDown(openDropdown, closeDropdown, isOpen, selectActiveItem);
+
+ const handleOnClick = () => {
+ if (closeOnSelect) closeDropdown();
+ };
+
useOutsideClickDetector(dropdownRef, closeDropdown);
let menuItems = (
@@ -101,7 +106,7 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
tabIndex={tabIndex}
className={cn("relative w-min text-left", className)}
onKeyDownCapture={handleKeyDown}
- onChange={handleOnChange}
+ onClick={handleOnClick}
>
{({ open }) => (
<>
@@ -110,7 +115,8 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
diff --git a/web/components/dashboard/widgets/created-issues.tsx b/web/components/dashboard/widgets/created-issues.tsx
index 296f69377..a5caae06b 100644
--- a/web/components/dashboard/widgets/created-issues.tsx
+++ b/web/components/dashboard/widgets/created-issues.tsx
@@ -13,7 +13,7 @@ import {
WidgetProps,
} from "components/dashboard/widgets";
// helpers
-import { getCustomDates, getRedirectionFilters } from "helpers/dashboard.helper";
+import { getCustomDates, getRedirectionFilters, getTabKey } from "helpers/dashboard.helper";
// types
import { TCreatedIssuesWidgetFilters, TCreatedIssuesWidgetResponse } from "@plane/types";
// constants
@@ -30,8 +30,8 @@ export const CreatedIssuesWidget: React.FC
= observer((props) => {
// derived values
const widgetDetails = getWidgetDetails(workspaceSlug, dashboardId, WIDGET_KEY);
const widgetStats = getWidgetStats(workspaceSlug, dashboardId, WIDGET_KEY);
- const selectedTab = widgetDetails?.widget_filters.tab ?? "pending";
- const selectedDurationFilter = widgetDetails?.widget_filters.target_date ?? "none";
+ const selectedDurationFilter = widgetDetails?.widget_filters.duration ?? "none";
+ const selectedTab = getTabKey(selectedDurationFilter, widgetDetails?.widget_filters.tab);
const handleUpdateFilters = async (filters: Partial) => {
if (!widgetDetails) return;
@@ -43,7 +43,7 @@ export const CreatedIssuesWidget: React.FC = observer((props) => {
filters,
});
- const filterDates = getCustomDates(filters.target_date ?? selectedDurationFilter);
+ const filterDates = getCustomDates(filters.duration ?? selectedDurationFilter);
fetchWidgetStats(workspaceSlug, dashboardId, {
widget_key: WIDGET_KEY,
issue_type: filters.tab ?? selectedTab,
@@ -83,19 +83,19 @@ export const CreatedIssuesWidget: React.FC = observer((props) => {
// switch to pending tab if target date is changed to none
if (val === "none" && selectedTab !== "completed") {
- handleUpdateFilters({ target_date: val, tab: "pending" });
+ handleUpdateFilters({ duration: val, tab: "pending" });
return;
}
// switch to upcoming tab if target date is changed to other than none
if (val !== "none" && selectedDurationFilter === "none" && selectedTab !== "completed") {
handleUpdateFilters({
- target_date: val,
+ duration: val,
tab: "upcoming",
});
return;
}
- handleUpdateFilters({ target_date: val });
+ handleUpdateFilters({ duration: val });
}}
/>
diff --git a/web/components/dashboard/widgets/issue-panels/tabs-list.tsx b/web/components/dashboard/widgets/issue-panels/tabs-list.tsx
index 93492160b..f94720a71 100644
--- a/web/components/dashboard/widgets/issue-panels/tabs-list.tsx
+++ b/web/components/dashboard/widgets/issue-panels/tabs-list.tsx
@@ -16,42 +16,40 @@ export const TabsList: React.FC