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/12/11 19:26:44 UTC

[GitHub] [incubator-superset] riahk commented on a change in pull request #11983: feat: add confirmation dialog for imports

riahk commented on a change in pull request #11983:
URL: https://github.com/apache/incubator-superset/pull/11983#discussion_r541194102



##########
File path: superset-frontend/src/views/CRUD/hooks.ts
##########
@@ -399,6 +439,7 @@ export function useImportResource<D extends object = any>(
     state: {
       loading: state.loading,

Review comment:
       Was discussing this with @nytai who originally wrote this logic for `useListViewResource`. I think the original intent was explicitly defining the state variables because some of that hook's state variables are strictly internal. However, in `useSingleViewResource` we're returning all the state variables, so it should be fine to just import the entire `state` object (I will probably refactor the hook to do this at some point).
   
   It looks like that's the case here as well so you can easily just import the entire `state` object like you suggested above.




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