Select & Inputs - setting binding

This commit is contained in:
Michael Shanks 2020-08-11 10:31:41 +01:00
parent d45daea02e
commit 46be753be8
2 changed files with 3 additions and 2 deletions

View File

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

View File

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