From 548c8bb3056646b88e1369c0b92233c068e818a4 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Fri, 21 Feb 2020 09:27:43 +0000 Subject: [PATCH] bugfix: generate css on screen change --- packages/builder/src/builderStore/store.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/builderStore/store.js b/packages/builder/src/builderStore/store.js index e6b5bf03d7..6894870eab 100644 --- a/packages/builder/src/builderStore/store.js +++ b/packages/builder/src/builderStore/store.js @@ -509,7 +509,7 @@ const createScreen = store => (screenName, route, layoutComponentName) => { const setCurrentScreen = store => screenName => { store.update(s => { const screen = getExactComponent(s.screens, screenName) - + screen._css = generate_screen_css([screen.props]) s.currentPreviewItem = screen s.currentFrontEndType = "screen" @@ -517,7 +517,6 @@ const setCurrentScreen = store => screenName => { getContainerComponent(s.components), screen.props ) - setCurrentScreenFunctions(s) return s }) @@ -706,6 +705,9 @@ const setCurrentPage = store => pageName => { s.pages[pageName].props ) s.currentPreviewItem = s.pages[pageName] + s.currentPreviewItem._css = generate_screen_css([ + s.currentPreviewItem.props, + ]) setCurrentScreenFunctions(s) return s