diff --git a/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx b/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx index 72451828a1..55a0370e06 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx @@ -54,7 +54,7 @@ const FormTitle = (props: FormTitleProps) => { } return false; }, - [currentDatasource, hasNameConflict], + [hasNameConflict], ); return ( diff --git a/app/client/src/pages/Editor/QueryEditor/index.tsx b/app/client/src/pages/Editor/QueryEditor/index.tsx index 973bce4bcc..79d041a0d1 100644 --- a/app/client/src/pages/Editor/QueryEditor/index.tsx +++ b/app/client/src/pages/Editor/QueryEditor/index.tsx @@ -19,6 +19,7 @@ import { getPluginImages, getDBDatasources, getAction, + getActionResponses, } from "selectors/entitiesSelector"; import { PLUGIN_PACKAGE_DBS } from "constants/QueryEditorConstants"; import { QueryAction } from "entities/Action"; @@ -49,7 +50,7 @@ type ReduxStateProps = { formData: QueryAction; runErrorMessage: Record; pluginIds: Array | undefined; - executedQueryData: any; + responses: any; isCreating: boolean; pluginImages: Record; editorConfig: []; @@ -91,7 +92,7 @@ class QueryEditor extends React.Component { }, pluginImages, pluginIds, - executedQueryData, + responses, isCreating, runErrorMessage, loadingFormConfigs, @@ -135,7 +136,7 @@ class QueryEditor extends React.Component { editorConfig={editorConfig} loadingFormConfigs={loadingFormConfigs} DATASOURCES_OPTIONS={DATASOURCES_OPTIONS} - executedQueryData={executedQueryData[queryId]} + executedQueryData={responses[queryId]} runErrorMessage={runErrorMessage[queryId]} /> ) : ( @@ -166,7 +167,7 @@ const mapStateToProps = (state: AppState, props: any): ReduxStateProps => { runErrorMessage, pluginIds: getPluginIdsOfPackageNames(state, PLUGIN_PACKAGE_DBS), dataSources: getDBDatasources(state), - executedQueryData: state.ui.queryPane.runQuerySuccessData, + responses: getActionResponses(state), queryPane: state.ui.queryPane, formData, editorConfig: queryAction?.pluginId diff --git a/app/client/src/reducers/uiReducers/queryPaneReducer.ts b/app/client/src/reducers/uiReducers/queryPaneReducer.ts index f070e76695..3bb7bd6606 100644 --- a/app/client/src/reducers/uiReducers/queryPaneReducer.ts +++ b/app/client/src/reducers/uiReducers/queryPaneReducer.ts @@ -14,7 +14,6 @@ const initialState: QueryPaneReduxState = { isRunning: {}, isSaving: {}, isDeleting: {}, - runQuerySuccessData: {}, runErrorMessage: {}, lastUsed: "", // NR }; @@ -24,7 +23,6 @@ export interface QueryPaneReduxState { isRunning: Record; isSaving: Record; // RR isDeleting: Record; - runQuerySuccessData: {}; runErrorMessage: Record; lastUsed: string; // NR isCreating: boolean; // RR @@ -126,13 +124,8 @@ const queryPaneReducer = createReducer(initialState, { ...state.isRunning, [action.payload.id]: true, }, - runQuerySuccessData: [], }; }, - [ReduxActionTypes.CLEAR_PREVIOUSLY_EXECUTED_QUERY]: (state: any) => ({ - ...state, - runQuerySuccessData: [], - }), [ReduxActionTypes.RUN_ACTION_SUCCESS]: ( state: any, @@ -145,10 +138,6 @@ const queryPaneReducer = createReducer(initialState, { ...state.isRunning, [actionId]: false, }, - runQuerySuccessData: { - ...state.runQuerySuccessData, - ...action.payload, - }, runErrorMessage: _.omit(state.runErrorMessage, [actionId]), }; }, diff --git a/app/client/src/utils/formhelpers.ts b/app/client/src/utils/formhelpers.ts index e665bf67ca..d39f40f857 100644 --- a/app/client/src/utils/formhelpers.ts +++ b/app/client/src/utils/formhelpers.ts @@ -14,6 +14,6 @@ export const isStrongPassword = (value: string) => { // TODO (abhinav): Use a regex which adheres to standards RFC5322 export const isEmail = (value: string) => { - const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(value); }; diff --git a/app/client/src/widgets/DropdownWidget.tsx b/app/client/src/widgets/DropdownWidget.tsx index 07d2179356..70c044fadb 100644 --- a/app/client/src/widgets/DropdownWidget.tsx +++ b/app/client/src/widgets/DropdownWidget.tsx @@ -1,6 +1,6 @@ import React from "react"; import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget"; -import { WidgetType, WIDGET_PADDING } from "constants/WidgetConstants"; +import { WidgetType } from "constants/WidgetConstants"; import { EventType } from "constants/ActionConstants"; import DropDownComponent from "components/designSystems/blueprint/DropdownComponent"; import _ from "lodash";