Browse Source
Merge pull request #832 from Budibase/cheeks-bugfixes
Cheeks bugfixes
gh-pages
Andrew Kingston
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
9 additions and
6 deletions
-
packages/builder/src/builderStore/store/frontend.js
-
packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte
-
packages/builder/src/components/userInterface/ComponentsHierarchy.svelte
|
|
|
@ -177,7 +177,7 @@ export const getFrontendStore = () => { |
|
|
|
const foundScreen = currentPageScreens.findIndex( |
|
|
|
el => el._id === screen._id |
|
|
|
) |
|
|
|
if (currentPageScreens !== -1) { |
|
|
|
if (foundScreen !== -1) { |
|
|
|
currentPageScreens.splice(foundScreen, 1) |
|
|
|
} |
|
|
|
currentPageScreens.push(screen) |
|
|
|
|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
<script> |
|
|
|
import { goto } from "@sveltech/routify" |
|
|
|
import { goto, params } from "@sveltech/routify" |
|
|
|
import { backendUiStore, store } from "builderStore" |
|
|
|
import { notifier } from "builderStore/store/notifications" |
|
|
|
import { Input, Label, ModalContent } from "@budibase/bbui" |
|
|
|
@ -51,6 +51,7 @@ |
|
|
|
const screens = screenTemplates($store, [table]) |
|
|
|
.filter(template => defaultScreens.includes(template.id)) |
|
|
|
.map(template => template.create()) |
|
|
|
store.actions.pages.select("main") |
|
|
|
for (let screen of screens) { |
|
|
|
// Record the table that created this screen so we can link it later |
|
|
|
screen.autoTableId = table._id |
|
|
|
|
|
|
|
@ -10,10 +10,12 @@ |
|
|
|
|
|
|
|
export let screens = [] |
|
|
|
|
|
|
|
$: sortedScreens = screens.sort( |
|
|
|
(s1, s2) => s1.props._instanceName > s2.props._instanceName |
|
|
|
) |
|
|
|
/* |
|
|
|
$: sortedScreens = screens.sort((s1, s2) => { |
|
|
|
const name1 = s1.props._instanceName?.toLowerCase() ?? "" |
|
|
|
const name2 = s2.props._instanceName?.toLowerCase() ?? "" |
|
|
|
return name1 > name2 ? 1 : -1 |
|
|
|
}) |
|
|
|
/* |
|
|
|
Using a store here seems odd.... |
|
|
|
have a look in the <ComponentsHierarchyChildren /> code file to find out why. |
|
|
|
I have commented the dragDropStore parameter |
|
|
|
|