hughhhh commented on a change in pull request #11755:
URL: 
https://github.com/apache/incubator-superset/pull/11755#discussion_r537974720



##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -96,11 +143,48 @@ export default class ResultSet extends React.PureComponent<
     this.toggleExploreResultsButton = this.toggleExploreResultsButton.bind(
       this,
     );
+    this.handleSaveInDataset = this.handleSaveInDataset.bind(this);
+    this.handleHideSaveModal = this.handleHideSaveModal.bind(this);
+    this.handleDatasetNameChange = this.handleDatasetNameChange.bind(this);
+    this.handleSaveDatasetRadioBtnState = 
this.handleSaveDatasetRadioBtnState.bind(
+      this,
+    );
+    this.handleOverwriteCancel = this.handleOverwriteCancel.bind(this);
+    this.handleOverwriteDataset = this.handleOverwriteDataset.bind(this);
+    this.handleOverwriteDatasetOption = this.handleOverwriteDatasetOption.bind(
+      this,
+    );
+    this.handleSaveDatasetModalSearch = this.handleSaveDatasetModalSearch.bind(
+      this,
+    );
+    this.handleFilterAutocompleteOption = 
this.handleFilterAutocompleteOption.bind(
+      this,
+    );
+    this.handleOnChangeAutoComplete = this.handleOnChangeAutoComplete.bind(
+      this,
+    );
+    this.handleCTASExploreBtnClick = this.handleCTASExploreBtnClick.bind(this);
+    this.handleExploreBtnClick = this.handleExploreBtnClick.bind(this);
   }
 
-  componentDidMount() {
+  async componentDidMount() {
     // only do this the first time the component is rendered/mounted
     this.reRunQueryIfSessionTimeoutErrorOnMount();
+
+    const appContainer = document.getElementById('app');
+    const bootstrapData = JSON.parse(
+      appContainer?.getAttribute('data-bootstrap') || '{}',
+    );
+
+    const datasets = await getByUser(bootstrapData.user.userId);
+    const userDatasetsOwned = datasets.map(
+      (r: { table_name: string; id: number }) => ({
+        datasetName: r.table_name,
+        datasetId: r.id,
+      }),
+    );
+
+    this.setState({ userDatasetsOwned });

Review comment:
       The database_ids is actually living in the bootstap-data, but is behind 
a featureFlag. @mistercrunch has a PR to fix
   
   https://github.com/apache/incubator-superset/pull/11934/files




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to