API reference: @salmonui/editors/inline-edit
InlineEditRenderContextinterface
import type { InlineEditRenderContext } from '@salmonui/editors/inline-edit';interface InlineEditRenderContext<T> {
readonly value: T;
readonly setValue: (value: T) => void;
readonly inputProps: InlineEditInputProps;
readonly save: () => void;
readonly cancel: () => void;
readonly pending: boolean;
readonly errors: readonly string[];
}
Argument of the children render prop.
| Name | Signature | Description |
|---|---|---|
value | readonly value: T; | The draft value. |
setValue | readonly setValue: (value: T) => void; | Replaces the draft. |
inputProps | readonly inputProps: InlineEditInputProps; | Wiring for a text-like input ( |
save | readonly save: () => void; | |
cancel | readonly cancel: () => void; | |
pending | readonly pending: boolean; | True while |
errors | readonly errors: readonly string[]; | Validation messages of the draft (empty when valid). |