noResults message with search term
See original GitHub issueI would like to show search term on noResults message. Is there any way to doing this?
Currently my code is like below, but it didn’t work:
$('#divId').select2(
{
language: {
noResults: function(term) {
return "No results found. Add <b>" + term + "</b>?";
}
}
}
);
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Searching by keyword returns no results even though the ...
Sometimes a keyword search returns no results, even though the keyword used exists in messages. To understand why this may happen, it's...
Read more >50780 - The message "There are no results that match your ...
... 50780: The message "There are no results that match your search" occurs when there are special characters at the end of a...
Read more >12 Awesome No Results Page Examples (+6 UI Design Best ...
The Best eCommerce No Results Page Examples. ... You don't have to over-complicate this: just tell them the search term they entered yielded...
Read more >3 Guidelines for Search Engine "No Results" Pages
No Results pages must clearly state that no results have been found to match the user's search terms. Appropriate typography and spacing are ......
Read more >Displaying message when no results returned JavaScript search
We have a JavaScript search script that pulls data from the Bing API. However, when no results are found for the users query, ......
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
I too think it would be helpful to either expose a
noResults
option on initialization that accepts either a string or a callback method that returns a string. For example:I’d be happy to put in a PR for this if I can get a go-ahead from a maintainer.
If you would like to do some more stuff on selecting newly added tag: