diff --git a/lerna.json b/lerna.json
index bdf45a24e2..a689dd4f8d 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "0.9.116",
+ "version": "0.9.117-alpha.1",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/auth/package.json b/packages/auth/package.json
index 41c24569f1..60f13a6191 100644
--- a/packages/auth/package.json
+++ b/packages/auth/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/auth",
- "version": "0.9.116",
+ "version": "0.9.117-alpha.1",
"description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js",
"author": "Budibase",
diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index 8ff06fa191..55a5594f9e 100644
--- a/packages/bbui/package.json
+++ b/packages/bbui/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
- "version": "0.9.116",
+ "version": "0.9.117-alpha.1",
"license": "AGPL-3.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
diff --git a/packages/bbui/src/Table/ArrayRenderer.svelte b/packages/bbui/src/Table/ArrayRenderer.svelte
new file mode 100644
index 0000000000..679973a03a
--- /dev/null
+++ b/packages/bbui/src/Table/ArrayRenderer.svelte
@@ -0,0 +1,17 @@
+
+
+{#each badges as badge}
+ {badge}
+{/each}
+{#if leftover}
+
+{leftover} more
+{/if}
diff --git a/packages/bbui/src/Table/CellRenderer.svelte b/packages/bbui/src/Table/CellRenderer.svelte
index 2d073b7782..d6a2f3196d 100644
--- a/packages/bbui/src/Table/CellRenderer.svelte
+++ b/packages/bbui/src/Table/CellRenderer.svelte
@@ -4,7 +4,7 @@
import DateTimeRenderer from "./DateTimeRenderer.svelte"
import RelationshipRenderer from "./RelationshipRenderer.svelte"
import AttachmentRenderer from "./AttachmentRenderer.svelte"
-
+ import ArrayRenderer from "./ArrayRenderer.svelte"
export let row
export let schema
export let value
@@ -19,6 +19,7 @@
options: StringRenderer,
number: StringRenderer,
longform: StringRenderer,
+ array: ArrayRenderer,
}
$: type = schema?.type ?? "string"
$: customRenderer = customRenderers?.find(x => x.column === schema?.name)
diff --git a/packages/builder/package.json b/packages/builder/package.json
index 5d9da6c162..fac5e5719e 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
- "version": "0.9.116",
+ "version": "0.9.117-alpha.1",
"license": "AGPL-3.0",
"private": true,
"scripts": {
@@ -65,10 +65,10 @@
}
},
"dependencies": {
- "@budibase/bbui": "^0.9.116",
- "@budibase/client": "^0.9.116",
+ "@budibase/bbui": "^0.9.117-alpha.1",
+ "@budibase/client": "^0.9.117-alpha.1",
"@budibase/colorpicker": "1.1.2",
- "@budibase/string-templates": "^0.9.116",
+ "@budibase/string-templates": "^0.9.117-alpha.1",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
diff --git a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js
index b890d42d54..c2dffef4b6 100644
--- a/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js
+++ b/packages/builder/src/builderStore/store/screenTemplates/newRowScreen.js
@@ -43,6 +43,7 @@ const createScreen = table => {
tableId: table._id,
type: "table",
},
+ size: "spectrum--medium",
})
const fieldGroup = new Component("@budibase/standard-components/fieldgroup")
diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js
index ec737fe36b..3ba8be10b5 100644
--- a/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js
+++ b/packages/builder/src/builderStore/store/screenTemplates/rowDetailScreen.js
@@ -101,7 +101,6 @@ const createScreen = table => {
.instanceName("Form")
.customProps({
actionType: "Update",
- theme: "spectrum--lightest",
size: "spectrum--medium",
dataSource: {
label: table.name,
diff --git a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js
index ccf1fceb29..188682ed3f 100644
--- a/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js
+++ b/packages/builder/src/builderStore/store/screenTemplates/rowListScreen.js
@@ -65,6 +65,7 @@ const createScreen = table => {
tableId: table._id,
type: "table",
},
+ size: "spectrum--medium",
paginate: true,
limit: 8,
})
diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js
index 1a64a8958f..5b3bc041ff 100644
--- a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js
+++ b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js
@@ -131,6 +131,7 @@ const fieldTypeToComponentMap = {
string: "stringfield",
number: "numberfield",
options: "optionsfield",
+ array: "multifieldselect",
boolean: "booleanfield",
longform: "longformfield",
datetime: "datetimefield",
@@ -167,6 +168,13 @@ export function makeDatasourceFormComponents(datasource) {
optionsSource: "schema",
})
}
+ if (fieldType === "array") {
+ component.customProps({
+ placeholder: "Choose an option",
+ optionsSource: "schema",
+ })
+ }
+
if (fieldType === "link") {
let placeholder =
fieldSchema.relationshipType === "one-to-many"
diff --git a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte
index 0724016679..e82c55679a 100644
--- a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte
+++ b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte
@@ -1,5 +1,12 @@
diff --git a/packages/builder/src/components/design/AppPreview/componentStructure.json b/packages/builder/src/components/design/AppPreview/componentStructure.json
index cea20a7dcf..3bc2554fde 100644
--- a/packages/builder/src/components/design/AppPreview/componentStructure.json
+++ b/packages/builder/src/components/design/AppPreview/componentStructure.json
@@ -21,7 +21,8 @@
"datetimefield",
"attachmentfield",
"relationshipfield",
- "daterangepicker"
+ "daterangepicker",
+ "multifieldselect"
]
},
{
diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte
index d41d28e4e3..ad647d1550 100644
--- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte
+++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/FilterEditor/FilterDrawer.svelte
@@ -59,6 +59,14 @@
expression.operator = validOperators[0] ?? OperatorOptions.Equals.value
onOperatorChange(expression, expression.operator)
}
+
+ // if changed to an array, change default value to empty array
+ const idx = filters.findIndex(x => x.field === field)
+ if (expression.type === "array") {
+ filters[idx].value = []
+ } else {
+ filters[idx].value = null
+ }
}
const onOperatorChange = (expression, operator) => {
@@ -74,7 +82,9 @@
const getFieldOptions = field => {
const schema = schemaFields.find(x => x.name === field)
- return schema?.constraints?.inclusion || []
+ const opt = schema?.constraints?.inclusion || []
+
+ return opt
}
@@ -122,7 +132,7 @@
/>
{:else if ["string", "longform", "number"].includes(filter.type)}
- {:else if filter.type === "options"}
+ {:else if filter.type === "options" || "array"}
{
return ConstraintMap[type]
}
@@ -190,6 +196,7 @@
valueType: "Binding",
type: fieldType,
id: generate(),
+ value: fieldType == "array" ? [] : null,
},
]
}
@@ -275,7 +282,7 @@
disabled={rule.constraint === "required"}
on:change={e => (rule.value = e.detail)}
/>
- {:else if ["maxLength", "minLength", "regex", "notRegex", "contains", "notContains"].includes(rule.constraint)}
+ {:else if rule.type !== "array" && ["maxLength", "minLength", "regex", "notRegex", "contains", "notContains"].includes(rule.constraint)}
+ {:else if rule.type === "array"}
+