Tidyup
This commit is contained in:
parent
545ebd0cf2
commit
c09544923d
|
@ -59,6 +59,7 @@
|
|||
function changed(e) {
|
||||
const val = e.target.checked
|
||||
checked = val
|
||||
|
||||
handleOnClick()
|
||||
if (_bb.isBound(_bb.props.checked)) {
|
||||
_bb.setStateFromBinding(_bb.props.checked, val)
|
||||
|
@ -67,7 +68,7 @@
|
|||
|
||||
function handleOnClick() {
|
||||
let item = { _id, checked, label, value }
|
||||
|
||||
debugger
|
||||
if (context === "checkboxgroup") {
|
||||
let idx = selectedItems.getItemIdx($selectedItems, _id)
|
||||
if (idx > -1) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
if (_bb.isBound(_bb.props.value)) {
|
||||
_bb.setStateFromBinding(_bb.props.value, value)
|
||||
}
|
||||
debugger
|
||||
_bb.call(onChange, value)
|
||||
}, value)
|
||||
_bb.setContext("BBMD:checkbox:selectedItemsStore", selectedItemsStore)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
onMount(() => {
|
||||
_bb.setContext("BBMD:input:context", "radiobuttongroup")
|
||||
selectedItemsStore = createItemStore(() => {
|
||||
value = $selectedItemsStore
|
||||
value = $selectedItemsStore[0]
|
||||
if (_bb.isBound(_bb.props.value)) {
|
||||
_bb.setStateFromBinding(_bb.props.value, value)
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
let instance
|
||||
|
||||
export let _bb
|
||||
export let onChange = value => {}
|
||||
export let variant = "continuous" //or discrete
|
||||
export let showTicks = false
|
||||
export let min = 0
|
||||
|
|
|
@ -33,7 +33,22 @@
|
|||
const page = {
|
||||
props: {
|
||||
_component: "testcomponents/rootComponent",
|
||||
_children: [Checkbox],
|
||||
_children: [
|
||||
Textfield,
|
||||
Checkboxgroup,
|
||||
Radiobutton,
|
||||
Radiobuttongroup,
|
||||
Datatable,
|
||||
CustomersIndexTable,
|
||||
Icon,
|
||||
List,
|
||||
Select,
|
||||
DatePicker,
|
||||
IconButton,
|
||||
Card,
|
||||
Switch,
|
||||
Slider,
|
||||
],
|
||||
},
|
||||
}
|
||||
_appPromise.then(initialise => {
|
||||
|
|
|
@ -84,7 +84,6 @@ export const props = {
|
|||
Checkboxgroup: {
|
||||
_component: "@budibase/materialdesign-components/Checkboxgroup",
|
||||
label: "Whats your favourite?",
|
||||
disabled: true,
|
||||
alignEnd: true,
|
||||
onChange: selectedItems => console.log(selectedItems),
|
||||
_children: [
|
||||
|
@ -117,7 +116,6 @@ export const props = {
|
|||
_component: "@budibase/materialdesign-components/Radiobuttongroup",
|
||||
label: "Preferred method of contact: ",
|
||||
orientation: "column",
|
||||
disabled: true,
|
||||
alignEnd: true,
|
||||
onChange: selected => console.log("Radiobutton Group", selected),
|
||||
_children: [
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
let tfInstance = null
|
||||
|
||||
onMount(() => {
|
||||
debugger
|
||||
if (!!tf) tfInstance = new MDCTextField(tf)
|
||||
return () => {
|
||||
!!tfInstance && tf.tfInstance && tf.tfInstance.destroy()
|
||||
|
|
Loading…
Reference in New Issue