Merge branch 'release' of github.com:appsmithorg/appsmith into release
This commit is contained in:
commit
d457614b4e
|
|
@ -23,12 +23,14 @@ import {
|
||||||
getAction,
|
getAction,
|
||||||
getPluginEditorConfigs,
|
getPluginEditorConfigs,
|
||||||
getDatasource,
|
getDatasource,
|
||||||
|
getPluginTemplates,
|
||||||
} from "selectors/entitiesSelector";
|
} from "selectors/entitiesSelector";
|
||||||
import { RestAction } from "entities/Action";
|
import { RestAction } from "entities/Action";
|
||||||
import { setActionProperty } from "actions/actionActions";
|
import { setActionProperty } from "actions/actionActions";
|
||||||
import { fetchPluginForm } from "actions/pluginActions";
|
import { fetchPluginForm } from "actions/pluginActions";
|
||||||
import { getQueryParams } from "utils/AppsmithUtils";
|
import { getQueryParams } from "utils/AppsmithUtils";
|
||||||
import { QUERY_CONSTANT } from "constants/QueryEditorConstants";
|
import { QUERY_CONSTANT } from "constants/QueryEditorConstants";
|
||||||
|
import { isEmpty } from "lodash";
|
||||||
|
|
||||||
function* changeQuerySaga(actionPayload: ReduxAction<{ id: string }>) {
|
function* changeQuerySaga(actionPayload: ReduxAction<{ id: string }>) {
|
||||||
const { id } = actionPayload.payload;
|
const { id } = actionPayload.payload;
|
||||||
|
|
@ -104,10 +106,17 @@ function* handleQueryCreatedSaga(actionPayload: ReduxAction<RestAction>) {
|
||||||
yield put(initialize(QUERY_EDITOR_FORM_NAME, data));
|
yield put(initialize(QUERY_EDITOR_FORM_NAME, data));
|
||||||
const applicationId = yield select(getCurrentApplicationId);
|
const applicationId = yield select(getCurrentApplicationId);
|
||||||
const pageId = yield select(getCurrentPageId);
|
const pageId = yield select(getCurrentPageId);
|
||||||
|
const pluginTemplates = yield select(getPluginTemplates);
|
||||||
|
const queryTemplate = pluginTemplates[action.pluginId];
|
||||||
|
// Do not show template view if the query has body(code) or if there are no templates
|
||||||
|
const showTemplate = !(
|
||||||
|
!!actionConfiguration.body || isEmpty(queryTemplate)
|
||||||
|
);
|
||||||
|
|
||||||
history.replace(
|
history.replace(
|
||||||
QUERIES_EDITOR_ID_URL(applicationId, pageId, id, {
|
QUERIES_EDITOR_ID_URL(applicationId, pageId, id, {
|
||||||
editName: "true",
|
editName: "true",
|
||||||
showTemplate: actionConfiguration.body ? "false" : "true",
|
showTemplate,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user