geido commented on code in PR #35264:
URL: https://github.com/apache/superset/pull/35264#discussion_r2387537960
##########
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx:
##########
@@ -169,6 +170,10 @@ const updateDataset = async (
headers,
body,
});
+
+ // Clear the dataset cache after updating to ensure fresh data
Review Comment:
```suggestion
```
##########
superset-frontend/src/components/Datasource/DatasourceModal/index.tsx:
##########
@@ -203,6 +204,11 @@ const DatasourceModal:
FunctionComponent<DatasourceModalProps> = ({
const { json } = await SupersetClient.get({
endpoint: `/api/v1/dataset/${currentDatasource?.id}`,
});
+
+ // Clear the dataset cache to ensure fresh data when fetching columns
for filters
+ // This ensures that changes to the dataset are immediately reflected
Review Comment:
```suggestion
```
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx:
##########
@@ -837,6 +838,11 @@ class DatasourceEditor extends PureComponent {
col => !col.expression, // remove calculated columns
),
});
+
+ // Clear the dataset cache to ensure fresh data when fetching columns
for filters
+ // This ensures that newly synced columns are immediately available in
filter creation
Review Comment:
```suggestion
```
##########
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx:
##########
@@ -335,15 +340,18 @@ export const SaveDatasetModal = ({
datasourceName: datasetName,
}),
)
- .then((data: { id: number }) =>
- postFormData(data.id, 'table', {
+ .then((data: { id: number }) => {
+ // Clear cache for the newly created dataset
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]