question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"No Result" Option

See original GitHub issue

I’ve seen numerous requests for this but all pretty dated. Has anyone come up with a way to do ‘No Results’? I tried using the onHideListEvent event to do it but didn’t come up with the same results as I expected.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:8
  • Comments:18

github_iconTop GitHub Comments

3reactions
mkrsIIcommented, May 25, 2017

Just ran into this problem… do something like this: you need to check if there’s nothing in the data source probably first

onHideListEvent

var containerList = $('#AutoCompleteID').next('.easy-autocomplete-container').find('ul'); if ($(containerList).children('li').length <= 0) { $(containerList).html('<li>No results found</li>').show(); }

0reactions
vishhnu-devcommented, Feb 4, 2021

The following code work’s for me. On ‘showAnimation’, remove li with class = “main-color” On hideAnimation add li with class =“main-color” if ul.childrenl.length <=0

showAnimation: { type: “slide”, time: 400, callback: function() { $(‘.easy-autocomplete-container ul’).next(‘.main-color’).remove(); } }, hideAnimation: { type: “slide”, time: 400, callback: function() { if( $(‘.easy-autocomplete-container ul’).children(‘li’).length <= 0) { $(‘.easy-autocomplete-container ul’).css(‘display’,‘block’); $(‘.easy-autocomplete-container ul’).append(‘

  • no results found…
  • ’); } else { $(‘.easy-autocomplete-container ul’).next(‘.main-color’).remove(); $(‘.easy-autocomplete-container ul’).css(‘display’,‘none’); } } }

    Read more comments on GitHub >

    github_iconTop Results From Across the Web

    Rust Option<> vs Result<> - Reddit
    In my code, I use Option only when None does not signify an error condition (yes, it requires some thought as to when...
    Read more >
    No Results option after optistruct analysis - Altair Community
    Hi, I'm new on Altair software. I meshed a component and ran an optistruct analysis. Everything seemed fine, analysis was completed ...
    Read more >
    Option and Result - Easy Rust
    Result is similar to Option, but here is the difference: Option is about Some or None (value or no value), Result is about...
    Read more >
    Pulling Results out of Options - Rust By Example
    Pulling Result s out of Option s ... Error 1: the input vector is empty. println! ... A couple of combinators come in...
    Read more >
    Rust #4: Options and Results (Part 2) - DEV Community ‍ ‍
    This is not surprising if you think about it because both can return results or a non-result. In Option 's case, the non-result...
    Read more >

    github_iconTop Related Medium Post

    No results found

    github_iconTop Related StackOverflow Question

    No results found

    github_iconTroubleshoot Live Code

    Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
    Start Free

    github_iconTop Related Reddit Thread

    No results found

    github_iconTop Related Hackernoon Post

    No results found

    github_iconTop Related Tweet

    No results found

    github_iconTop Related Dev.to Post

    No results found

    github_iconTop Related Hashnode Post

    No results found