Search the documentation

Type to search page titles, component names and descriptions.

    Data Entry

    InlineEdit

    Edit one value in place.

    import { InlineEdit } from 'faifo-design'

    InlineEdit turns a displayed value into an editor and back. The edit state is controlled, a native form is the fallback, and a stale version or a rejected input is shown where the value is.

    #When to use

    • Use it for a single value a reader corrects often, such as a quantity in a row.
    • Use a RecordForm when several values change together.

    #Examples

    Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.

    #Inline edit

    Controlled edit state keeps a native form fallback, stale version and rejected input.

    Customer
    Cancel
    Show codeHide code
    import { InlineEdit } from 'faifo-design'
    
    export const Example = () => (
      <InlineEdit
        id="customer-name"
        label="Customer"
        value="An Việt"
        editing
        editHref="?edit=customer"
        cancelHref="?edit="
        action="/orders/SO-1042/customer"
        name="customer"
        inputValue="An Việt Trading"
        version="7"
      />
    )

    #API

    Generated from the package source. A property without a description has none in the source yet.

    #InlineEditComponent

    PropertyDescriptionTypeDefault
    idrequired–string–
    labelrequired–string–
    valuerequired–JSXChild–
    editingrequired–boolean–
    editHrefrequired–string–
    cancelHrefrequired–string–
    actionrequired–string–
    namerequired–string–
    inputValuerequired–string–
    version–string–
    error–string | null–
    saveLabel–string'Save'
    cancelLabel–string'Cancel'

    #Types

    #InlineEditProps

    The properties of InlineEdit, listed above.

    #Hooks

    The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.

    • inline-edit
    • inline-edit-value
    • inline-edit-form
    • inline-edit-actions