Add custom content when active
See original GitHub issueFeature request: yes
What is the expected behavior? It’s possible to set default content when the autocomplete is active. For example, Facebook shows the search history. Content could be:
- API Call.
- Static content.
Is there any plan to support something like this? It is similar to empty
key.
empty: function() {
return '<div class="not-found"><span>¯\\(ツ)/¯ Sorry, no results found...<span></div>';
}

Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
active - CSS: Cascading Style Sheets - MDN Web Docs
To style links appropriately, put the :active rule after all other link-related rules, as defined by the LVHA-order: :link — :visited ...
Read more >HOW TO INSTALL CUSTOM CONTENT HOUSES/LOTS (The ...
Hey, boo! I'm showing you how to install cc houses for The Sims 4! The same directions work for Sims downloaded not found...
Read more >How do you add custom styling to a tab when it's active in ...
Select the bootstrap item you want to override, then make sure you make your own bootstrap class in your style file that loads...
Read more >How to add active class on click event in custom list group in ...
In Bootstrap 4, Javascript or jQuery events are used to add active class on click event in custom list group. Syntax:.
Read more >Customize the user interface with HTML templates - Azure AD ...
Learn how to customize the user interface with HTML templates for your applications that use Azure Active Directory B2C.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jelen07 Yes, you can find an example on this sandbox. It happens in the
getSources
function, where you return sources conditionally based on thequery
value. Note that this version is still alpha, meaning that’ll we’ll introduce breaking changes to this version and that we won’t provide support for it.This is possible by returning a source which is valid for empty query in the next version of autocomplete, v1. Documentation for that can be found here: https://autocomplete-experimental.netlify.app/docs/sources#using-dynamic-sources-based-on-query