1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00
This commit is contained in:
Michael Shanks 2020-03-05 14:55:34 +00:00
parent dd1d3643e4
commit 812f60ec77
3 changed files with 11 additions and 10 deletions

View file

@ -17,9 +17,7 @@ const postcssOptions = () => ({
],
})
const coreExternal = [
"shortid",
]
const coreExternal = ["shortid"]
export default {
input: "src/index.js",

View file

@ -32,10 +32,13 @@ const heading = record => ({
const field = (record, f) => {
if (f.type === "bool") return checkbox(record, f)
if (f.type === "string"
&& f.typeOptions
&& f.typeOptions.values
&& f.typeOptions.values.length > 0) return select(record, f)
if (
f.type === "string" &&
f.typeOptions &&
f.typeOptions.values &&
f.typeOptions.values.length > 0
)
return select(record, f)
return textField(record, f)
}
@ -64,8 +67,8 @@ const select = (record, f) => ({
_children: f.typeOptions.values.map(val => ({
_component: "@budibase/materialdesign-components/ListItem",
value: val,
text: val
}))
text: val,
})),
})
const fieldValueBinding = (record, f) => `state.${record.name}.${f.name}`

View file

@ -4,7 +4,7 @@ const templateOptions = {
indexes: [
{
name: "customers",
nodeKey: () => "/customers"
nodeKey: () => "/customers",
},
],
helpers: {