Pro Pack
Docs HomeProduct SiteSupport
  • Introduction
  • Installation
  • Chart.js
    • Configuration
    • Data Binding
    • Data Labels
  • Dataset Filter Labels
    • Installation
    • Configuration
    • Data Binding
  • DataTables
    • Configuration
    • Data Binding
    • Events
    • Methods
  • Date Range Picker
    • Configuration
    • Data Binding
    • Methods
  • iCheck
    • List
      • Configuration
      • Data Binding
      • Events
    • Filter
      • Configuration
      • Data Binding
  • Select2
    • Configuration
    • Data Binding
    • Events
    • Methods
  • Sparklines
    • Installation
    • Configuration
    • Data Binding
  • Toastr
    • Configuration
  • Web Frameworks
Powered by GitBook
On this page
  • Properties
  • Datamap

Was this helpful?

  1. iCheck
  2. List

Data Binding

PreviousConfigurationNextEvents

Last updated 3 years ago

Was this helpful?

The for the iCheck List for WireBootstrap 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 unique value for a item

label

The field in the data to be used as the display label for each item

selected

Optional. The field in the data to determine which item should be selected

const users = [
    { value: "bsimmons", label: "Ben Simmons", selected: true },
    { value: "jembiid", label: "Joel Embiid", selected: false }
]

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

Datamap

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

const users = [
    { user: "bsimmons", name: "Ben Simmons" },
    { user: "jembiid", name: "Joel Embiid" },
]

const list = new wire.icheckList().render("#list", {
    data: users,
    datamap: { value: "user", label: "name" }
});
datamap