Bootstrap
Docs HomeProduct SiteSupport
  • Introduction
  • Buttons
    • Configuration
    • Data Binding
  • Checkboxes
    • Configuration
    • Data Binding
    • Events
  • Input
    • Configuration
    • Data Binding
    • Events
    • Methods
  • Modals
    • Message
    • Error
  • Search List
    • Configuration
    • Data Binding
    • Methods
  • Select
    • Configuration
    • Data Binding
    • Events
  • Table
    • Configuration
    • Data Binding
    • Events
  • Web Components
Powered by GitBook
On this page
  • Properties
  • Datamap
  1. Input

Data Binding

PreviousConfigurationNextEvents

Last updated 2 years ago

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

Properties

Name

Description

value

The field in the data to be used as the value for the input

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 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" }
});
data map
datarow