mithril-materialized
    Preparing search index...

    Interface OptionsAttrs<T>

    interface OptionsAttrs<T extends string | number> {
        checkboxClass?: string;
        checkedId?: T | T[];
        class?: string;
        className?: string;
        description?: string;
        disabled?: boolean;
        id?: string;
        isMandatory?: boolean;
        key?: string | number;
        label?: string;
        layout?: "vertical" | "horizontal";
        newRow?: boolean;
        onchange?: (checkedIds: T[]) => void;
        options: InputOption<T>[];
        selectAllText?: string;
        selectNoneText?: string;
        showSelectAll?: boolean;
        onbeforeremove?(this: any, vnode: VnodeDOM<any, any>): void | Promise<any>;
        onbeforeupdate?(
            this: any,
            vnode: Vnode<any, any>,
            old: VnodeDOM<any, any>,
        ): boolean | void;
        oncreate?(this: any, vnode: VnodeDOM<any, any>): any;
        oninit?(this: any, vnode: Vnode<any, any>): any;
        onremove?(this: any, vnode: VnodeDOM<any, any>): any;
        onupdate?(this: any, vnode: VnodeDOM<any, any>): any;
        [property: string]: any;
    }

    Type Parameters

    • T extends string | number

    Hierarchy

    • Attributes
      • OptionsAttrs

    Indexable

    • [property: string]: any

      Any other virtual element properties, including attributes and event handlers.

    Index

    Properties

    checkboxClass?: string

    Optional CSS that is added to the input checkbox, e.g. if you add col s4, the items will be put inline

    checkedId?: T | T[]

    Currently selected ids. This property controls the component state and should be updated externally to change selection programmatically.

    class?: string

    The class name(s) for this virtual element, as a space-separated list.

    className?: string

    The class name(s) for this virtual element, as a space-separated list.

    description?: string

    Optional description

    disabled?: boolean

    If true, disable the options.

    id?: string

    Element ID

    isMandatory?: boolean

    If true, add a mandatory '*' after the label

    key?: string | number

    A key to optionally associate with this element.

    label?: string

    Optional title or label

    layout?: "vertical" | "horizontal"

    Layout for the options: 'vertical' (default) or 'horizontal'

    newRow?: boolean

    If true, start on a new row

    onchange?: (checkedIds: T[]) => void

    Event handler that is called when an option is changed

    options: InputOption<T>[]

    The options that you have

    selectAllText?: string

    Text for select all button

    selectNoneText?: string

    Text for select none button

    showSelectAll?: boolean

    If true, show select all/none buttons

    Methods

    • The onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes.

      Parameters

      • this: any
      • vnode: VnodeDOM<any, any>

      Returns void | Promise<any>

    • The onbeforeupdate hook is called before a vnode is diffed in a update.

      Parameters

      • this: any
      • vnode: Vnode<any, any>
      • old: VnodeDOM<any, any>

      Returns boolean | void

    • The oncreate hook is called after a DOM element is created and attached to the document.

      Parameters

      • this: any
      • vnode: VnodeDOM<any, any>

      Returns any

    • The oninit hook is called before a vnode is touched by the virtual DOM engine.

      Parameters

      • this: any
      • vnode: Vnode<any, any>

      Returns any

    • The onremove hook is called before a DOM element is removed from the document.

      Parameters

      • this: any
      • vnode: VnodeDOM<any, any>

      Returns any

    • The onupdate hook is called after a DOM element is updated, while attached to the document.

      Parameters

      • this: any
      • vnode: VnodeDOM<any, any>

      Returns any