3.0.4
Use labelKey={option => option.value}
Work properly
Crash
Uncaught Error: One or more options does not have a valid label string. Check the
labelKeyprop to ensure that it matches the correct option key and provides a string for filtering and display.
It works with version ~2.3.0~ 2.6.0
Case 1: When I use labelKey={"value"} it works fine.
Case 2: When I use labelKey={option => `${option.value}`} it doesn't crash anymore, but when scrolling to the bottom, instead of "Display additional results..." I see "undefined", and when clicking on it, it loads more results as intended. In this case, passing paginationText has no effect, it keeps showing "undefined" (tried both passing string and paginationText={{ value: "Display additional results..." }})
For now I will either disable pagination as the label isn't always on top level of the object to use labelKey as in case 1, or revert back to ~2.3.0~ 2.6.0 until this is fixed 馃槙 hopefully it's easy to fix.
And btw, thanks for all the work and effort put into making this package!
@abdulrahman-khankan: Thanks for the detailed report, I can reproduce the issue.
This should be fixed as of v3.1.0.
@ericgio Could you please double check v3.1.0 on npm? Trying to install it and seems to be missing the src files.
https://registry.npmjs.org/react-bootstrap-typeahead/-/react-bootstrap-typeahead-3.1.0.tgz has no src files.
You're right, it looks like npm didn't include the files in the package. This has happened a couple times before and I have no idea why. Will try to release a patch that should hopefully fix the issue.
Looks like it's all there in v3.1.1. Sorry about that!
Works great, thank you!
Most helpful comment
Looks like it's all there in v3.1.1. Sorry about that!