Merge pull request #845 from Budibase/auto-screens-issue
fix auto screens issue
This commit is contained in:
commit
239bc03396
|
@ -234,12 +234,12 @@ export const getFrontendStore = () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
// _saveCurrentPreviewItem
|
saveSelected: async () => {
|
||||||
saveSelected: () => {
|
|
||||||
const state = get(store)
|
const state = get(store)
|
||||||
state.currentFrontEndType === "page"
|
if (state.currentFrontEndType !== "page") {
|
||||||
? store.actions.pages.save()
|
await store.actions.screens.save(state.currentPreviewItem)
|
||||||
: store.actions.screens.save(state.currentPreviewItem)
|
}
|
||||||
|
await store.actions.pages.save()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pages: {
|
pages: {
|
||||||
|
|
|
@ -55,16 +55,7 @@
|
||||||
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
|
||||||
try {
|
await store.actions.screens.create(screen)
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create autolink to newly created list page
|
// Create autolink to newly created list page
|
||||||
|
|
Loading…
Reference in New Issue