Merge branch 'fix/page-load-js-eval' into 'release'

Fix page load time

See merge request theappsmith/internal-tools-client!399
This commit is contained in:
Hetu Nandu 2020-03-18 08:40:53 +00:00
commit 208e139e0e
2 changed files with 6 additions and 7 deletions

View File

@ -123,12 +123,12 @@ export function* fetchPageSaga(
if (isValidResponse) {
// Get Canvas payload
const canvasWidgetsPayload = getCanvasWidgetsPayload(fetchPageResponse);
// Execute page load actions
yield put(executePageLoadActions(canvasWidgetsPayload.pageActions));
// Update the canvas
yield put(updateCanvas(canvasWidgetsPayload));
// dispatch fetch page success
yield put(fetchPageSuccess());
// Execute page load actions
yield put(executePageLoadActions(canvasWidgetsPayload.pageActions));
}
} catch (error) {
yield put({
@ -155,8 +155,6 @@ export function* fetchPublishedPageSaga(
const isValidResponse = yield validateResponse(response);
if (isValidResponse) {
const canvasWidgetsPayload = getCanvasWidgetsPayload(response);
// Execute page load actions
yield put(executePageLoadActions(canvasWidgetsPayload.pageActions));
yield put(updateCanvas(canvasWidgetsPayload));
yield put({
type: ReduxActionTypes.FETCH_PUBLISHED_PAGE_SUCCESS,
@ -167,6 +165,8 @@ export function* fetchPublishedPageSaga(
pageWidgetId: canvasWidgetsPayload.pageWidgetId,
},
});
// Execute page load actions
yield put(executePageLoadActions(canvasWidgetsPayload.pageActions));
}
} catch (error) {
yield put({

View File

@ -65,9 +65,8 @@ class InputWidget extends BaseWidget<InputWidgetProps, WidgetState> {
componentDidMount() {
super.componentDidMount();
if (this.props.defaultText) {
this.updateWidgetMetaProperty("text", this.props.defaultText);
}
const text = this.props.defaultText || "";
this.updateWidgetMetaProperty("text", text);
}
componentDidUpdate(prevProps: InputWidgetProps) {