suddjian commented on a change in pull request #9211: show edit modal on
dashboards list view
URL:
https://github.com/apache/incubator-superset/pull/9211#discussion_r387356006
##########
File path: superset-frontend/src/views/dashboardList/DashboardList.tsx
##########
@@ -251,8 +250,33 @@ class DashboardList extends React.PureComponent<Props,
State> {
return Boolean(this.state.permissions.find(p => p === perm));
};
- handleDashboardEdit = ({ id }: { id: number }) => {
- window.location.assign(`/dashboard/edit/${id}`);
+ openDashboardEditModal = (dashboard: Dashboard) => {
+ this.setState({
+ dashboardToEdit: dashboard,
+ });
+ };
+
+ handleDashboardEdit = (edits: any, original: Dashboard) => {
+ this.setState({ loading: true });
+ return SupersetClient.get({
+ endpoint: `/api/v1/dashboard/${original.id}`,
Review comment:
I think there was some field that wasn't returned from the `PUT` endpoint. I
wasn't sure how to add that field and eventually just did this to make it work.
If you think it's worth the effort I'll take another pass at it, otherwise I
can add a comment documenting why it's there.
----------------------------------------------------------------
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]