# SchedulerResource (@salmonui/scheduler)

> The SchedulerResource interface of @salmonui/scheduler: A resource definition: the items an event field refers to. Field options name the item properties.

Canonical: https://salmonui.dev/docs/reference/scheduler/SchedulerResource

```ts
import type { SchedulerResource } from '@salmonui/scheduler';
```

Entry index: https://salmonui.dev/docs/reference/scheduler (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/scheduler.md).

## Reference

Kind: interface

```ts
interface SchedulerResource<Item = Record<string, unknown>> {
    readonly field: string;
    readonly name: string;
    readonly label?: string;
    readonly data: readonly Item[];
    readonly idField?: string;
    readonly textField?: string;
    readonly colorField?: string;
    readonly parentIdField?: string;
    readonly workDaysField?: string;
    readonly startHourField?: string;
    readonly endHourField?: string;
    readonly classNameField?: string;
    readonly expandedField?: string;
    readonly multiple?: boolean;
}
```

A resource definition: the items an event field refers to. Field options name the item properties.

Members (14):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `field` | `readonly field: string;` |  | The event property that holds the item id (or ids with `multiple`). |
| `name` | `readonly name: string;` |  | Name used by `grouping.resources`. |
| `label` | `readonly label?: string;` | optional | Editor field label (default `name`). |
| `data` | `readonly data: readonly Item[];` |  |  |
| `idField` | `readonly idField?: string;` | optional | Item properties (defaults `id`, `text`, `color`, `parentId`, `workDays`, `startHour`, `endHour`, `className`, `expanded`). |
| `textField` | `readonly textField?: string;` | optional |  |
| `colorField` | `readonly colorField?: string;` | optional |  |
| `parentIdField` | `readonly parentIdField?: string;` | optional |  |
| `workDaysField` | `readonly workDaysField?: string;` | optional |  |
| `startHourField` | `readonly startHourField?: string;` | optional |  |
| `endHourField` | `readonly endHourField?: string;` | optional |  |
| `classNameField` | `readonly classNameField?: string;` | optional |  |
| `expandedField` | `readonly expandedField?: string;` | optional |  |
| `multiple` | `readonly multiple?: boolean;` | optional | An event may refer to several items (the field holds an array). |
