fix: add missing DataTableProvider (#20473)
* fix: add missing DataTableProvider * add e2e test
This commit is contained in:
1 parent
f1a832921a
commit
1d9d52ecf8
3 files changed
+61
-2
No files matched your search
@@ -2,7 +2,8 @@ import type { ColumnDef } from "@tanstack/react-table";
|
||||
import { useReactTable, getCoreRowModel } from "@tanstack/react-table";
|
||||
import { useRef, useState } from "react";
|
||||
|
||||
import { DataTable, DataTableToolbar } from "@calcom/features/data-table";
|
||||
import { DataTableProvider } from "@calcom/features/data-table/DataTableProvider";
|
||||
import { DataTable, DataTableToolbar } from "@calcom/features/data-table/components";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
|
||||
@@ -17,6 +18,14 @@ interface TeamGroupMapping {
|
||||
}
|
||||
|
||||
const GroupTeamMappingTable = () => {
|
||||
return (
|
||||
<DataTableProvider>
|
||||
<GroupTeamMappingTableContent />
|
||||
</DataTableProvider>
|
||||
);
|
||||
};
|
||||
|
||||
const GroupTeamMappingTableContent = () => {
|
||||
const { t } = useLocale();
|
||||
const [createTeamDialogOpen, setCreateTeamDialogOpen] = useState(false);
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ import { getCoreRowModel, getFilteredRowModel, useReactTable } from "@tanstack/r
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { DataTable, DataTableToolbar } from "@calcom/features/data-table";
|
||||
import { DataTableProvider } from "@calcom/features/data-table/DataTableProvider";
|
||||
import { DataTable, DataTableToolbar } from "@calcom/features/data-table/components";
|
||||
import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import type { DateRange } from "@calcom/lib/date-ranges";
|
||||
import { useDebounce } from "@calcom/lib/hooks/useDebounce";
|
||||
@@ -67,6 +68,14 @@ function UpgradeTeamTip() {
|
||||
}
|
||||
|
||||
export function AvailabilitySliderTable(props: { userTimeFormat: number | null; isOrg: boolean }) {
|
||||
return (
|
||||
<DataTableProvider>
|
||||
<AvailabilitySliderTableContent {...props} />
|
||||
</DataTableProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function AvailabilitySliderTableContent(props: { userTimeFormat: number | null; isOrg: boolean }) {
|
||||
const tableContainerRef = useRef<HTMLDivElement>(null);
|
||||
const [browsingDate, setBrowsingDate] = useState(dayjs());
|
||||
const [editSheetOpen, setEditSheetOpen] = useState(false);
|
||||
|
||||
Reference in new issue
Block a user