View as Markdown

API reference: @salmonui/editors/inline-edit

InlineEditInputPropsinterface

import type { InlineEditInputProps } from '@salmonui/editors/inline-edit';
interface InlineEditInputProps {
    readonly id: string;
    readonly value: string;
    readonly onChange: (event: {
        readonly target: {
            readonly value: string;
        };
    }) => void;
    readonly onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
    readonly 'aria-invalid': true | undefined;
    readonly 'aria-describedby': string | undefined;
    readonly 'aria-label': string | undefined;
    readonly readOnly: boolean;
    readonly autoFocus: true;
}

Props for the edit element: spread them on an input or pass them to a Salmon field.

InlineEditInputProps members (9)
NameSignatureDescription
idreadonly id: string;
valuereadonly value: string;
onChangereadonly onChange: (event: { readonly target: { readonly value: string; }; }) => void;
onKeyDownreadonly onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
aria-invalidreadonly 'aria-invalid': true | undefined;
aria-describedbyreadonly 'aria-describedby': string | undefined;
aria-labelreadonly 'aria-label': string | undefined;
readOnlyreadonly readOnly: boolean;
autoFocusreadonly autoFocus: true;