BoundInput JS
Renders an input
, select
, button
, or textarea
that is bound to the designated object. Changing input updates object attribute, and changing object's attribute updates the input.
Text Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "text"
}).el
Number Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "number"
}).el
Date Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "date"
}).el
Checkbox Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "checkbox"
}).el
Checkbox Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "checkbox",
value: "foo"
}).el
Button Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "button",
value: "foo",
content: "Set to \"foo\""
}).el
Select Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "select",
includeBlank: true,
options: [
"foo",
"bar"
]
}).el
Select Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "select",
multiple: true,
options: [
[
"foo",
"Option 1"
],
[
"bar",
"Option 2"
],
[
"zoo",
"Option 3"
]
]
}).el
Textarea Input
object.foo
:
new BoundInput({
record: record,
attribute: "foo",
type: "textarea"
}).el
Options
// TODO