etr2460 commented on a change in pull request #9337: Filter owners select by 
text input
URL: 
https://github.com/apache/incubator-superset/pull/9337#discussion_r404335268
 
 

 ##########
 File path: superset-frontend/src/dashboard/components/PropertiesModal.jsx
 ##########
 @@ -90,41 +91,42 @@ class PropertiesModal extends React.PureComponent {
     // datamodel, the dashboard could probably just be passed as a prop.
     SupersetClient.get({
       endpoint: `/api/v1/dashboard/${this.props.dashboardId}`,
-    })
-      .then(response => {
-        const dashboard = response.json.result;
-        this.setState(state => ({
-          isDashboardLoaded: true,
-          values: {
-            ...state.values,
-            dashboard_title: dashboard.dashboard_title || '',
-            slug: dashboard.slug || '',
-            json_metadata: dashboard.json_metadata || '',
-          },
-        }));
-        const initialSelectedValues = dashboard.owners.map(owner => ({
-          value: owner.id,
-          label: owner.username,
-        }));
-        this.onOwnersChange(initialSelectedValues);
-      })
-      .catch(err => console.error(err));
+    }).then(response => {
+      const dashboard = response.json.result;
+      this.setState(state => ({
+        isDashboardLoaded: true,
+        values: {
+          ...state.values,
+          dashboard_title: dashboard.dashboard_title || '',
+          slug: dashboard.slug || '',
+          json_metadata: dashboard.json_metadata || '',
+        },
+      }));
+      const initialSelectedOwners = dashboard.owners.map(owner => ({
+        value: owner.id,
+        label: `${owner.first_name} ${owner.last_name}`,
 
 Review comment:
   I guess this is fine for now then, but we really should prioritize fixing 
this. It falls in line with a lot of the other work that was done to shore up 
the data model in the metadata database

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


With regards,
Apache Git Services

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

Reply via email to