Skip to content

allowCustomValues PropType requires Number but README says Boolean #246

@jacobsmith

Description

@jacobsmith

Hello,

Thanks for this library! It's been very easy to pull down and get integrated. I did run into one issue:

The current README states that allowCustomValues is a boolean prop that can be passed in ( https://github.com/fmoo/react-typeahead#propsallowcustomvalues ).

However, when I have that set to false, I see the following in my console:

Warning: Failed prop type: Invalid prop `allowCustomValues` of type `boolean` supplied to `Typeahead`, expected `number`.
    in Typeahead (created by Typeahead)
    in Typeahead (created by ConnectedField)
    in ConnectedField (created by Connect(ConnectedField))
    in Connect(ConnectedField) (created by Field)
    ...

I'd be more than happy to update documentation, but I wanted to check first what the intended use case is. My first impression was that if my list contains ['foo', 'bar'] and I type fooa and click away, the onBlur would set it back to empty (because I want to disallow entries that are not in the list). I'm not seeing that behavior, so figured I can write up some documentation with the results of this thread.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions