diff --git a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts index 3e6657afd0..b129d73e37 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ActionExecution/ActionSelector_JsToNonJSMode_2_spec.ts @@ -508,7 +508,7 @@ describe("JS to non-JS mode in Action Selector", () => { propPane.ToggleJSMode("onClick"); propPane.ValidatePropertyFieldValue( "onClick", - `{{copyToClipboard('line1\\nline2\\nline3a');}}`, + `{{copyToClipboard('aline1\\nline2\\nline3');}}`, ); }); diff --git a/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx b/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx index e250d0ba00..7d35a6ef3f 100644 --- a/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/Field/index.tsx @@ -217,6 +217,7 @@ export function Field(props: FieldProps) { }, value: value, additionalAutoComplete: props.additionalAutoComplete, + dataTreePath: props.dataTreePath, }); break; case FieldType.CALLBACK_FUNCTION_API_AND_QUERY: @@ -235,6 +236,7 @@ export function Field(props: FieldProps) { }, value: value, additionalAutoComplete: props.additionalAutoComplete, + dataTreePath: props.dataTreePath, }); break; default: diff --git a/app/client/src/components/editorComponents/ActionCreator/FieldGroup/index.tsx b/app/client/src/components/editorComponents/ActionCreator/FieldGroup/index.tsx index 2e4c47f92f..5d80eb4bd1 100644 --- a/app/client/src/components/editorComponents/ActionCreator/FieldGroup/index.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/FieldGroup/index.tsx @@ -79,6 +79,7 @@ function FieldGroup(props: FieldGroupProps) {
  • ( & SwitcherProps; @@ -77,6 +78,7 @@ export type ActionCreatorProps = { propertyName: string; widgetType: string; widgetName: string; + dataTreePath: string | undefined; }; export type Field = { @@ -114,6 +116,7 @@ export type FieldProps = { navigateToSwitches: Array; activeTabApiAndQueryCallback: SwitchType; apiAndQueryCallbackTabSwitches: SwitchType[]; + dataTreePath?: string | undefined; }; export type FieldGroupProps = Omit< diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx index cd1015828b..aacc686a1c 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx @@ -23,6 +23,7 @@ export default function ActionSelector(props: { open: boolean; id: string; level: number; + dataTreePath: string | undefined; onChange: (actionBlock: TActionBlock, del?: boolean) => void; }) { const action = props.action; @@ -43,7 +44,13 @@ export default function ActionSelector(props: { } + content={ + + } isOpen={props.open} minimal popoverClassName={popoverClassName} @@ -60,6 +67,7 @@ type TActionSelectorFormProps = { action: TActionBlock; onChange: (actionBlock: TActionBlock, del?: boolean) => void; additionalAutoComplete?: AdditionalDynamicDataTree; + dataTreePath: string | undefined; }; const pathClassList = [ @@ -176,6 +184,7 @@ function ActionSelectorForm(props: TActionSelectorFormProps) {
    { { @@ -59,6 +60,7 @@ describe("tests for Action Tree in Action Selector", () => { { diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionTree.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionTree.tsx index 9e5b5f44e6..7907c81dae 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionTree.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionTree.tsx @@ -53,6 +53,7 @@ export default function ActionTree(props: { widgetName: string; propertyName: string; widgetType: string; + dataTreePath: string | undefined; }) { const { id } = props; const [actionBlock, setActionBlock] = React.useState(props.actionBlock); @@ -175,6 +176,7 @@ export default function ActionTree(props: {
    { evaluated = evaluatedValue; if (dataTreePath) { - evaluated = pathEvaluatedValue; + evaluated = + pathEvaluatedValue !== undefined ? pathEvaluatedValue : evaluated; } const entityInformation = this.getEntityInformation(); diff --git a/app/client/src/components/propertyControls/ActionSelectorControl.tsx b/app/client/src/components/propertyControls/ActionSelectorControl.tsx index 36dcf4d0fa..8fa14a121b 100644 --- a/app/client/src/components/propertyControls/ActionSelectorControl.tsx +++ b/app/client/src/components/propertyControls/ActionSelectorControl.tsx @@ -61,7 +61,13 @@ class ActionSelectorControl extends BaseControl { }; render() { - const { label, propertyName, propertyValue, widgetProperties } = this.props; + const { + dataTreePath, + label, + propertyName, + propertyValue, + widgetProperties, + } = this.props; return ( { additionalControlData={ this.props.additionalControlData as Record } + dataTreePath={dataTreePath} onValueChange={this.handleValueUpdate} propertyName={propertyName} ref={this.componentRef} diff --git a/app/client/src/components/propertyControls/ColumnActionSelectorControl.tsx b/app/client/src/components/propertyControls/ColumnActionSelectorControl.tsx index e909236f82..c202dcafdb 100644 --- a/app/client/src/components/propertyControls/ColumnActionSelectorControl.tsx +++ b/app/client/src/components/propertyControls/ColumnActionSelectorControl.tsx @@ -60,6 +60,7 @@ class ColumnActionSelectorControl extends BaseControl