Merge pull request #845 from Budibase/auto-screens-issue

fix auto screens issue
This commit is contained in:
Martin McKeaveney 2020-11-09 16:02:51 +00:00 committed by GitHub
commit 239bc03396
2 changed files with 6 additions and 15 deletions

View File

@ -234,12 +234,12 @@ export const getFrontendStore = () => {
},
},
preview: {
// _saveCurrentPreviewItem
saveSelected: () => {
saveSelected: async () => {
const state = get(store)
state.currentFrontEndType === "page"
? store.actions.pages.save()
: store.actions.screens.save(state.currentPreviewItem)
if (state.currentFrontEndType !== "page") {
await store.actions.screens.save(state.currentPreviewItem)
}
await store.actions.pages.save()
},
},
pages: {

View File

@ -55,16 +55,7 @@
for (let screen of screens) {
// Record the table that created this screen so we can link it later
screen.autoTableId = table._id
try {
await store.actions.screens.create(screen)
} catch (_) {
// TODO: this is temporary
// a cypress test is failing, because I added the
// NewRow component. So - this throws an exception
// because the currently released standard-components (on NPM)
// does not have NewRow
// we should remove this after this has been released
}
await store.actions.screens.create(screen)
}
// Create autolink to newly created list page