diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js
index 58d803aa03..7903210f53 100644
--- a/packages/builder/src/builderStore/store/frontend.js
+++ b/packages/builder/src/builderStore/store/frontend.js
@@ -92,11 +92,41 @@ export const getFrontendStore = () => {
// Allow errors to propagate.
let components = await API.fetchComponentLibDefinitions(application.appId)
+ // Extend definitions with custom components
+ components["test"] = {
+ component: "test",
+ name: "Super cool component",
+ icon: "Text",
+ description: "A custom component",
+ showSettingsBar: false,
+ hasChildren: true,
+ settings: [
+ {
+ type: "text",
+ key: "text",
+ label: "Text",
+ },
+ ],
+ context: {
+ type: "static",
+ values: [
+ {
+ label: "Text prop",
+ key: "text",
+ },
+ ],
+ },
+ }
+
+ // Filter out custom component keys so we can flag them
+ let customComponents = ["test"]
+
// Reset store state
store.update(state => ({
...state,
libraries: application.componentLibraries,
components,
+ customComponents,
clientFeatures: {
...INITIAL_FRONTEND_STATE.clientFeatures,
...components.features,
@@ -397,9 +427,6 @@ export const getFrontendStore = () => {
if (!componentName) {
return null
}
- if (!componentName.startsWith("@budibase")) {
- componentName = `@budibase/standard-components/${componentName}`
- }
return get(store).components[componentName]
},
createInstance: (componentName, presetProps) => {
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js
index 1c789d858e..64a05c7246 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js
@@ -37,6 +37,9 @@ export default `
}
+