Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enabled js mode by default for Table and Select widget form display ui button #39032

Merged
merged 6 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe(
dataSources.AddSuggestedWidget(Widgets.Table);
debuggerHelper.AssertErrorCount(0);
table.WaitUntilTableLoad(0, 0, "v2");
propPane.AssertPropertiesDropDownCurrentValue("Table data", "Api1");
propPane.ValidatePropertyFieldValue("Table data", "{{Api1.data}}");

// Create another API so that it returns object response
apiPage.CreateAndFillApi(
Expand Down Expand Up @@ -108,10 +108,7 @@ describe(
);
debuggerHelper.AssertErrorCount(0);
table.WaitUntilTableLoad(0, 0, "v2");
propPane.AssertPropertiesDropDownCurrentValue(
"Table data",
"ARRAY_RESPONSE",
);
propPane.ValidatePropertyFieldValue("Table data", "{{ARRAY_RESPONSE.data}}");

// Create API so that it returns object response
apiPage.CreateAndFillApi(
Expand All @@ -124,10 +121,7 @@ describe(
dataSources._addSuggestedExisting,
);
table.WaitUntilTableLoad(0, 0, "v2");
propPane.ValidatePropertyFieldValue(
"Table data",
"{{OBJECT_RESPONSE.data.users}}",
);
propPane.ValidatePropertyFieldValue("Table data", "{{ARRAY_RESPONSE.data}}");
});
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,14 @@ if (CURRENT_REPO == REPO.CE) {
dataSources.EnterQuery(query);
dataSources.RunQuery();
dataSources.AddSuggestedWidget(Widgets.Table); //Binding to new table from schema explorer
propPane.AssertPropertiesDropDownCurrentValue("Table data", "Query6");
propPane.ValidatePropertyFieldValue("Table data", "{{Query6.data}}");

EditorNavigation.SelectEntityByName("Query6", EntityType.Query);
dataSources.AddSuggestedWidget(
Widgets.Table,
dataSources._addSuggestedExisting,
);
propPane.AssertPropertiesDropDownCurrentValue("Table data", "Query6");
propPane.ValidatePropertyFieldValue("Table data", "{{Query6.data}}");
});

//To add test for duplicate collection name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,7 @@ function getWidgetProps(
props: {
[fieldName]: `{{${actionName}.${suggestedWidget.bindingQuery}}}`,
dynamicBindingPathList: [{ key: "tableData" }],
dynamicPropertyPathList:
suggestedWidget.bindingQuery === "data"
? []
: [{ key: "tableData" }],
dynamicPropertyPathList: [{ key: "tableData" }],
},
parentRowSpace: 10,
};
Expand Down
6 changes: 5 additions & 1 deletion app/client/src/sagas/SnipingModeSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export function* bindDataToWidgetSaga(
: oneClickBindingQuery;
let isDynamicPropertyPath = true;

if (bindingQuery === oneClickBindingQuery) {
if (
bindingQuery === oneClickBindingQuery &&
selectedWidget.type !== "TABLE_WIDGET_V2" &&
selectedWidget.type !== "SELECT_WIDGET"
) {
isDynamicPropertyPath = false;
}

Expand Down
Loading