Data Binding

The data map for the Bootstrap Input component is listed below. The component expects these field names in its data configuration.

Properties

const users = [
    { value: "Jim Kennedy" }
]

const input = new wire.bsInput().render("#input", {
    data: users
});

The component will bind to the first record in the users array unless there is more than one record and the base datarow configuration option is used.

Datamap

Use the datamap configuration property to bind a data structure to the component that does not have the same field names.

const users = [
    { name: "Jim Kennedy" }
]

const input = new wire.bsInput().render("#input", {
    data: users,
    datamap: { value: "name" }
});

Last updated