Search and Auto Correct with an external API

@ihayes I came up with a workaround. The below works for me because the data that I want to search only has to be loaded once, and this can be on page load:

  1. Follow the tutorial here: https://bubble.io/page?type=page&name=searchdemo2&id=plugindemos&tab=tabs-1 to set up the Search and Autocorrect Plugin
  2. Now, do not set the data source for the Search and Autocorrect component yet. Instead, follow the steps below.
  3. Create another repeating group with the same Data Type as you did in step 1. This should be the data type that your API call returns.
  4. Go to your workflows --> new workflow --> on page load --> display a list in a repeating group --> select the repeating group you created in step (3) --> select your desired API call as the data source
  5. Return to you “Search and Autocomplete” element, and set the datasource to the repeating group from step 3’s list of API objects
  6. Preview and confirm that the search is working properly
  7. Return to the repeating group created in step (3). Set its height and width to 1 px, and give it a condition such that when the group contains >= 0 elements, visibility should be false. This will hide the component and keep it from affecting the design of your UI.
3 Likes