search loader icon doesnt get closed when recieving error from server #1922
-
hi, we use the "responseAsync" method of the search element in order to use our own custom API method instead of Fomantic-UI's method. The search elements response (array of objects) is received in the "results" property. when the API's response state is success(200), everything is fine, because the 'results' property is created and the search's menu gets populated and search's loader turns off automatically. but when the API response's state is unsuccessful (404 , etc), our web application sends a response with an "error" tag, so the "results" tag doesn't exist in this situation, so here the searches loader keeps on spinning. i want to know that is there a method (behavior) for "search" to manually turn off the loader icon by a Fomantic-UI method? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Yes: $('.ui.search').search('remove loading'); However, it does nothing more than removing the |
Beta Was this translation helpful? Give feedback.
Yes:
However, it does nothing more than removing the
loading
class from theui search
element, which you can also do manually.It's not documented, because it was intentionally used internally only. However, each function inside the module can be called as a behavior (for example you can also use
set loading
to enable the loading icon.