CE-1954: fix abort not working, or running with cleanup on call
- Bug with abort not working caused by two things: (1) AbortController being instantiated in the wrong place, (2) AbortController is not reusable once abort() has been called; it needs to be reinstantiated once used
- Bug with cleanup not running if call=true (default behavior) caused by no cleanup being run...refactored to allow running cleanup!
😄 - Cleaned up tests a little bit...there's much more work to do to catch leaks that cause intermittent failures (wrapping in act) but this requires a lot more work so it's not being addressed here more than absolutely necessary
- Added JSdocs to useAsync and useAPIMethod hooks
- Added storybook story for useAPIMethod hook each for the call=true and call=false use cases
- Added debug logging so useAsync to make tracking behavior manually a bit easier
- Unrelated: silenced warning in AutoComplete about using foreign proptypes (this is fine, we are forwarding the MUI proptypes)
Closes CE-1954
Edited by Christina Jenks