-
+
diff --git a/packages/builder/src/userInterface/NewComponent.svelte b/packages/builder/src/userInterface/NewComponent.svelte
index a6fb579f64..aef5b822c1 100644
--- a/packages/builder/src/userInterface/NewComponent.svelte
+++ b/packages/builder/src/userInterface/NewComponent.svelte
@@ -11,7 +11,7 @@ import UIkit from "uikit";
import { isRootComponent } from "./pagesParsing/searchComponents";
import { splitName } from "./pagesParsing/splitRootComponentName.js"
-import {
+import {
find, filter, some, map, includes
} from "lodash/fp";
import { assign } from "lodash";
@@ -29,13 +29,13 @@ let name="";
let saveAttempted=false;
store.subscribe(s => {
-
+ console.log(s)
layoutComponents = pipe(s.components, [
filter(c => c.container),
map(c => ({name:c.name, ...splitName(c.name)}))
]);
- layoutComponent = layoutComponent
+ layoutComponent = layoutComponent
? find(c => c.name === layoutComponent.name)(layoutComponents)
: layoutComponents[0];
@@ -48,7 +48,7 @@ const save = () => {
const isValid = name.length > 0
&& !screenNameExists(name)
&& layoutComponent;
-
+
if(!isValid) return;
store.createScreen(name, layoutComponent.name);
@@ -59,7 +59,7 @@ const cancel = () => {
UIkit.modal(componentSelectorModal).hide();
}
-const screenNameExists = (name) =>
+const screenNameExists = (name) =>
some(s => s.name.toLowerCase() === name.toLowerCase())(screens)
@@ -84,7 +84,7 @@ const screenNameExists = (name) =>
-