UseSharePointPlannerReturn
@spartanfx/react / UseSharePointPlannerReturn
Interface: UseSharePointPlannerReturn
Return type for useSharePointPlanner hook Returns props that can be spread directly into Planner component
Properties
| Property | Type | Description |
|---|---|---|
error | Error | Error state |
items | Record<string, unknown>[] | Array of raw items to be transformed by the Planner |
loading | boolean | Loading state - true when fetching data |
onCreate | (input) => Promise<Record<string, unknown>> | Create a new item in SharePoint |
onDelete | (id) => Promise<void> | Delete an item from SharePoint |
onPlannerDatesChanged | (newStartDate, newEndDate) => void | Callback to handle planner date changes (connect to onPlannerDatesChanged prop) |
onRefresh | () => Promise<void> | Force refresh the data |
onUpdate | (id, input) => Promise<void> | Update an existing item in SharePoint |
options | IPlannerOptions | Planner options with CRUD callbacks |
schema | IPlannerSchema | Schema passed through for the Planner |