Browse Source
Merge pull request #845 from Budibase/auto-screens-issue
fix auto screens issue
pull/850/head
Martin McKeaveney
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
15 deletions
-
packages/builder/src/builderStore/store/frontend.js
-
packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte
|
|
|
@ -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: { |
|
|
|
|
|
|
|
@ -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 |
|
|
|
|