You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The other controller types likely have similar issues. We should ensure that when a search cancels, errors out, or is prevented that the loading state is properly set back to false. Testing should be improved around these situations to validate that we have the proper state (loading: false).
The text was updated successfully, but these errors were encountered:
There exists a condition whereby the controllers can get locked into a
loading: true
state. This state is set when thebeforeSearch
event kicks off, and typically is set tofalse
when theafterStore
event concludes. In the SearchController, the loading state never returns tofalse
when the following return takes place:https://github.com/searchspring/snap/blob/v0.61.5/packages/snap-controller/src/Search/SearchController.ts#L355
However, I am pretty sure that this return would also leave the controller in a similar state:
https://github.com/searchspring/snap/blob/v0.61.5/packages/snap-controller/src/Search/SearchController.ts#L344
There is a "catch" block below that does set the loading state back to
false
when errors are caught, but that does not happen in the cases above.https://github.com/searchspring/snap/blob/v0.61.5/packages/snap-controller/src/Search/SearchController.ts#L530
The other controller types likely have similar issues. We should ensure that when a search cancels, errors out, or is prevented that the loading state is properly set back to
false
. Testing should be improved around these situations to validate that we have the proper state (loading: false
).The text was updated successfully, but these errors were encountered: