API reference: @salmonui/kanban
KanbanEditorFieldinterface
import type { KanbanEditorField } from '@salmonui/kanban';interface KanbanEditorField<T> {
readonly field: string;
readonly label: string;
readonly kind?: 'text' | 'select' | 'number' | 'textarea' | undefined;
readonly options?: readonly {
readonly value: KanbanKey;
readonly label: string;
}[] | undefined;
readonly required?: boolean | undefined;
readonly validate?: ((value: unknown, draft: T) => string | null | undefined) | undefined;
}
A field of the built-in editor.
| Name | Signature | Description |
|---|---|---|
field | readonly field: string; | |
label | readonly label: string; | |
kindoptional | readonly kind?: 'text' | 'select' | 'number' | 'textarea' | undefined; | |
optionsoptional | readonly options?: readonly {
readonly value: KanbanKey;
readonly label: string;
}[] | undefined; | Options of a |
requiredoptional | readonly required?: boolean | undefined; | |
validateoptional | readonly validate?: ((value: unknown, draft: T) => string | null | undefined) | undefined; | Returns an error message, or nothing when the value is valid. |