1
0
Fork 0
mirror of synced 2024-07-02 21:10:43 +12:00

Fix autoscreens sometimes created in public rather than private page

This commit is contained in:
Andrew Kingston 2020-11-09 08:40:47 +00:00
parent 8fecebf435
commit 2ccd8fe401

View file

@ -1,5 +1,5 @@
<script> <script>
import { goto } from "@sveltech/routify" import { goto, params } from "@sveltech/routify"
import { backendUiStore, store } from "builderStore" import { backendUiStore, store } from "builderStore"
import { notifier } from "builderStore/store/notifications" import { notifier } from "builderStore/store/notifications"
import { Input, Label, ModalContent } from "@budibase/bbui" import { Input, Label, ModalContent } from "@budibase/bbui"
@ -51,6 +51,7 @@
const screens = screenTemplates($store, [table]) const screens = screenTemplates($store, [table])
.filter(template => defaultScreens.includes(template.id)) .filter(template => defaultScreens.includes(template.id))
.map(template => template.create()) .map(template => template.create())
store.actions.pages.select("main")
for (let screen of screens) { for (let screen of screens) {
// Record the table that created this screen so we can link it later // Record the table that created this screen so we can link it later
screen.autoTableId = table._id screen.autoTableId = table._id