You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/07/10 17:22:39 UTC

[GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #10284: fix(explore): edit datasource does not update control states

graceguo-supercat commented on a change in pull request #10284:
URL: https://github.com/apache/incubator-superset/pull/10284#discussion_r452974200



##########
File path: superset-frontend/src/explore/controls.jsx
##########
@@ -204,9 +204,9 @@ export const controls = {
     label: t('Datasource'),
     default: null,
     description: null,
-    mapStateToProps: (state, control, actions) => ({
-      datasource: state.datasource,
-      onDatasourceSave: actions ? actions.setDatasource : () => {},
+    mapStateToProps: ({ datasource }) => ({
+      datasource,
+      isEditable: !!datasource,

Review comment:
       Could you please set this isEditable a datasource property? in airbnb we do have use-case that don't allow user to edit certain datasources.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org