Files
calendar/packages/features/data-table/hooks/useDataTable.ts
T
Eunjae LeeandGitHub d927662dd7 fix: relocate action buttons on org member list (#20336)
* fix: relocate filter segment buttons on org member list

* implement toolbarContainerRef

* adjust location

* reorganize the hierarchy of DataTableProvider

* rename toolbar container to cta container

* move clear button to toolbar right
2025-03-26 14:18:39 +00:00

12 lines
295 B
TypeScript

import { useContext } from "react";
import { DataTableContext } from "../DataTableProvider";
export function useDataTable() {
const context = useContext(DataTableContext);
if (!context) {
throw new Error("useDataTable must be used within a DataTableProvider");
}
return context;
}