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.

Keep suggestions open after a choice is made

See original GitHub issue

Is there a way to keep the suggestions open after a choice is made? Or, more generally: I want the suggestions to be open any time the input has focus.

I tried shouldRenderSuggestions={() => true}. It doesn’t accomplish this.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
khrome83commented, Feb 11, 2021

I agree, this is an issue. Seems to be a bug. I am looking for a work around.

0reactions
globalmattcommented, Jun 5, 2021

Not sure if this is a perfect workaround for what you need, but it works for my use case:

const inputProps = {
    onClick: (e) => {
        e.currentTarget.blur();
        e.currentTarget.focus();
    },
};

...

<Autosuggest
    inputProps={inputProps} 
    shouldRenderSuggestions={() => true}
/>

This blurs and refocuses the input when it’s clicked, which in turn triggers the suggestions to pop up again (much like the way react-autocomplete works).

Read more comments on GitHub >

github_iconTop Results From Across the Web

MUI Autocomplete: How to prevent open on focus, instead ...
Below is a working example of one way to do this. This specifies the onOpen, onClose, onInputChange, open, and inputValue props in addition...
Read more >
Suggest edits in Google Docs - Computer
Suggest changes to a file. On your computer, open a document at docs.google.com. Select the text you want to change. A button appears...
Read more >
Siri Suggestions on iPhone - Apple Support
On iPhone, Siri makes suggestions for what you might want to do next, ... See Keep what Siri knows about you up to...
Read more >
Track changes in Word - Microsoft Support
Accept changes in-line with the right-click banner option · Right-click a tracked change in the document to review a single suggestion. · On...
Read more >
Video: Track changes and show markup - Microsoft Support
Word stops making new edits, and any made stay in the document. Use Show Markup. Select Review > Display for Review. Select the...
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