@ark7/model - v2.0.56
    Preparing search index...

    Interface EditableOptions

    Options for Editable annotation.

    interface EditableOptions {
        autoHide?: EditableEvaluate<boolean>;
        copyText?: EditableEvaluate<string>;
        disabled?: EditableEvaluate<boolean>;
        displayWidth?: EditableEvaluate<string | number>;
        editWidth?: EditableEvaluate<string | number>;
        hide?: EditableEvaluate<boolean>;
        hideDisplay?: EditableEvaluate<boolean>;
        hideEditing?: EditableEvaluate<boolean>;
        hint?: EditableEvaluate<string>;
        info?: EditableEvaluate<string>;
        inputType?: EditableEvaluate<EditableInputType>;
        listItemRemovable?: EditableEvaluate<boolean, [any]>;
        options?: EditableEvaluate<object | { label: any; value: any }[]>;
        reference?: EditableEvaluate<EditableOptionsReference>;
        type?: EditableEvaluate<EditableType>;
        width?: EditableEvaluate<string | number>;
    }
    Index

    Properties

    autoHide?: EditableEvaluate<boolean>

    Automatically hide the field in display mode if the value is false or non-existent.

    copyText?: EditableEvaluate<string>

    Specify the text to copy.

    disabled?: EditableEvaluate<boolean>

    Control if the field is disabled.

    displayWidth?: EditableEvaluate<string | number>
    editWidth?: EditableEvaluate<string | number>
    hide?: EditableEvaluate<boolean>

    Determines if the field should be hidden in both display and editing modes.

    // Hide the field in both display and editing modes based on a condition.
    @Editable({
    hide(this: ThisClass) {
    return this.conditionalFieldValue;
    }
    })
    fieldName: string;
    hideDisplay?: EditableEvaluate<boolean>

    Determines if the field should be hidden in display mode.

    // Hide the field in display mode based on a condition.
    @Editable({
    hideDisplay(this: ThisClass) {
    return this.conditionalFieldValue;
    }
    })
    fieldName: string;
    hideEditing?: EditableEvaluate<boolean>

    Determines if the field should be hidden in editing mode.

    // Hide the field in editing mode based on a condition.
    @Editable({
    hideEditing(this: ThisClass) {
    return this.conditionalFieldValue;
    }
    })
    fieldName: string;
    hint?: EditableEvaluate<string>
    info?: EditableEvaluate<string>

    Specifies the type of input element to render for the editable field.

    Allowed values:

    • 'area': Renders a textarea for multi-line text input.
    • 'text': Renders a standard single-line text input.
    • 'date': Renders a date picker.
    • 'datetime': Renders a date and time picker.
    • 'currency': Renders an input formatted for currency values.
    • 'percent': Renders an input formatted for percentage values.
    • 'number': Renders a numeric input.
    • 'boolean': Renders a checkbox or toggle for boolean values.
    • 'email': Renders an input for email addresses.
    • 'password': Renders a password input.
    • 'link': Renders an input for URLs.
    • 'duration': Renders an input for time durations.
    • 'phone': Renders an input formatted for phone numbers.

    The property accepts either a direct value or a function that returns one.

    // Use a text input for a name field.
    @Editable({
    inputType: 'text'
    })
    name: string;
    // Use a textarea for a multi-line description.
    @Editable({
    inputType: 'area'
    })
    description: string;
    listItemRemovable?: EditableEvaluate<boolean, [any]>

    For list item, check if the list item is removable.

    The following code disables the removable function if the author has any publications:

    @EditableOptions({
    listItemRemovable: (author: Author) => author.publications === 0;
    })
    authors: Ref<Author>[];
    options?: EditableEvaluate<object | { label: any; value: any }[]>

    Options for select fields.

    This property is used to provide a list of options for select fields. It can be an object or an array of objects, each containing a label and a value.

    Reference options.

    // Example of using reference with query and navigate options.
    reference: {
    query: {},
    navigate: {
    routerLink: '/flow/characters/${_id}',
    queryParams: {},
    fragment: 'Settings',
    },
    }

    Specify the type of the field.

    width?: EditableEvaluate<string | number>