How does one populate search results from a custom async data source? #2888
Unanswered
designosis
asked this question in
Modules (Modal, Dropdown, Popup, Calendar, Toast, ...)
Replies: 1 comment 1 reply
-
I'm curious, is this an extremely odd request? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the following ...
... to hijack the lovely search UI and get results the way I need to. I can't use API
MyAXAJ creates the following array ...
... and then spits out a javascript call like this:
This last bit is my failed attempt at showing my results via the category template, using code I found here: https://stackoverflow.com/questions/38033330/semantic-ui-search-custom-data-source.
(ALSO an FYI: The API callbacks on https://fomantic-ui.com/modules/search.html are broken.)
A super hacky solution is to call
$('#search').search('destroy');
then re-instantiate the$('#search').search()
, passing$res
as the source. But now I have to enter my search twice because the source wasn't there before. Which makes me thing there may be a way to trigger the search viaset value
, but that becomes so convoluted, and there must be a simpler way. I just need a way to push my custom results to Fomantic UI's search results, such that myonSelect
function is passed the entireresult
(includingmyID
)Any advice on how to do this?
Beta Was this translation helpful? Give feedback.
All reactions