Check
Marks an independent option as selected.
When to use
- Let users select an optional part of a form or acknowledge a condition.
Examples
Include a packing slip
Loading the example
<k:Check text="Include packing slip" change=".onChange"/>sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) => Controller.extend("sample.CheckChange", {
onChange(event) {
Toast.show(event.getParameter("selected") ? "Packing slip included" : "Packing slip removed");
}
}));Confirm order review
Loading the example
<k:Check text="I reviewed the address" help="Check the postcode and delivery entrance." change=".onChange"/>sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) => Controller.extend("sample.CheckChange", {
onChange(event) {
Toast.show(event.getParameter("selected") ? "Address review marked" : "Address review cleared");
}
}));API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
selected | boolean | false | Whether the box is checked |
text | string | Label text | |
help | string | Supporting text | |
enabled | boolean | true | Whether the box can be used |
Events
| Name | Type | Description |
|---|---|---|
change | selected: boolean | The checked state changed |