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.

onInputChange not working properly when multiple is true

See original GitHub issue

Hello,

I’m using react-bootstrap-typeahead with redux-forms. onInputChange works perfectly if multiple is set to false.

The code:

<Typeahead
                    clearButton
                    emptyLabel="No matches found !"
                    multiple
                    options={field.options}
                    onInputChange={(value) => {
                            // do something ...
                        }
                    }
                    {...field.input}
/>

The problem is that value will always be an empty string.

Thank you and have a nice day 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
scuerdacommented, Sep 5, 2017

@ericgio @bradeac fwiw, I had a similar issue that was resolved by changing onInputChange to onChange when using multiple. Thank you @ericgio for a very nice library.

0reactions
ajhurlimancommented, Apr 13, 2018

I ran into the same problem and the solution proposed by @scuerda worked for me. Thanks everyone!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Event not firing on input change for appended elements
Your fiddle doesn't append any form elements. But if you append elements, you'll need to set the change event on each element as...
Read more >
oninput Event - W3Schools
The oninput event occurs when an element gets user input. This event occurs when the value of an <input> or <textarea> element is...
Read more >
Communicating with Shiny via JavaScript
Inputs send values from the client to the server, and when the server has values for the client to display, they are received...
Read more >
API - React Select
If true , close the select menu when the user scrolls the document/body. If a function, takes a standard javascript ScrollEvent you return...
Read more >
How to use debounce on input change with React-hook-form ...
The function we passed to the debounce would trigger, but the validation functions did not work. I've gone down that path for a...
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