commit
0dd73b5e71
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue