Select & Inputs - setting binding

This commit is contained in:
Michael Shanks 2020-08-11 10:31:41 +01:00
parent 608efaca70
commit 37edb6af7d
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,8 @@
const onchange = ev => {
if (_bb) {
_bb.setBinding("value", ev.target.value)
const val = type === "checkbox" ? ev.target.checked : ev.target.value
_bb.setBinding("value", val)
}
}
</script>

View File

@ -11,7 +11,7 @@
const onchange = ev => {
if (_bb) {
_bb.setStateFromBinding(_bb.props.value, ev.target.value)
_bb.setBinding("value", ev.target.value)
}
}
</script>