Check if there's a network request already in flight#79
Conversation
|
This probably needs a failing test before the fix commit. |
keithamus
left a comment
There was a problem hiding this comment.
Seems reasonable. Is it instead better to use AbortControllers to close previous requests, so that we always use the latest request?
Yeah, I think we could. I wanted to avoid doing multiple requests altogether though since I thought that was an error in itself. |
I was gonna do this but then we still emit the event twice because I think we can refactor more in this component to make something like that easier but that would probably result in a breaking change. |
Make sure not to fire off additional requests if there's already one in-flight. I chose to reflect this on the element through the read-only
busyattribute.Fixes #75