Skip to content

Commit

Permalink
fix trigger eval after url is updated using navigateTo
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhrathod01 committed Apr 8, 2024
1 parent 704943c commit 14e63a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 0 additions & 3 deletions app/client/src/ce/actions/evaluationActionsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,13 @@ export const EVALUATE_REDUX_ACTIONS = [
ReduxActionTypes.UPDATE_SELECTED_APP_THEME_SUCCESS,
ReduxActionTypes.CHANGE_SELECTED_APP_THEME_SUCCESS,
ReduxActionTypes.SET_PREVIEW_APP_THEME,

// Custom Library
ReduxActionTypes.INSTALL_LIBRARY_SUCCESS,
ReduxActionTypes.UNINSTALL_LIBRARY_SUCCESS,
// Buffer
ReduxActionTypes.BUFFERED_ACTION,
// Generic
ReduxActionTypes.TRIGGER_EVAL,
//
ReduxActionTypes.SET_URL_DATA,
];
// Topics used for datasource and query form evaluations
export const FORM_EVALUATION_REDUX_ACTIONS = [
Expand Down
11 changes: 9 additions & 2 deletions app/client/src/sagas/ActionExecution/NavigateActionSaga.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { call, select } from "redux-saga/effects";
import { call, put, select } from "redux-saga/effects";
import { getCurrentPageId, getPageList } from "selectors/editorSelectors";
import _ from "lodash";
import type { Page } from "@appsmith/constants/ReduxActionConstants";
import {
ReduxActionTypes,
type Page,
} from "@appsmith/constants/ReduxActionConstants";
import AnalyticsUtil from "utils/AnalyticsUtil";
import { getAppMode } from "@appsmith/selectors/applicationSelectors";
import { APP_MODE } from "entities/App";
Expand Down Expand Up @@ -58,6 +61,9 @@ export default function* navigateActionSaga(action: TNavigateToDescription) {
history.push(path);
if (currentPageId === page.pageId) {
yield call(setDataUrl);
yield put({
type: ReduxActionTypes.TRIGGER_EVAL,
});
}
} else if (target === NavigationTargetType.NEW_WINDOW) {
window.open(path, "_blank");
Expand Down Expand Up @@ -88,6 +94,7 @@ export default function* navigateActionSaga(action: TNavigateToDescription) {
} else if (target === NavigationTargetType.NEW_WINDOW) {
window.open(url, "_blank");
}

AppsmithConsole.info({
text: `navigateTo('${url}') was triggered`,
state: {
Expand Down

0 comments on commit 14e63a8

Please sign in to comment.