rusackas commented on code in PR #40912:
URL: https://github.com/apache/superset/pull/40912#discussion_r3384766521


##########
superset-frontend/src/hooks/apiResources/apiResources.ts:
##########
@@ -86,6 +86,7 @@ const initialState: LoadingState = {
  */
 export function useApiResourceFullBody<RESULT>(
   endpoint: string,
+  skip = false,

Review Comment:
   Good catch. Added unit tests for the `skip` parameter in 
`apiResources.test.ts`: one verifying that `skip=true` short-circuits the fetch 
and keeps the hook in the Loading state, and one verifying that toggling `skip` 
from `true` to `false` re-enables the request and resolves to Complete.



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

To unsubscribe, e-mail: [email protected]

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