Closed Sylv0 closed 4 years ago
Hi @Sylv0 - I don't know much about Typescript unfortunately but I would be happy to accept a PR. I'm assuming the types would match react-select since this component is just a wrapper around their Select component but with a custom MenuList component.
Bit late, but for any others, you can solve this pretty easily. @Sylv0 you are right and the types do work perfectly fine by mirroring them, you can do this by adding:
declare module 'react-windowed-select' {
import { StateManager } from 'react-select'
export default StateManager
}
in a missing types d.ts
file in your project.
Thanks @alecmolloy ! Closing this issue since the only non react-select
prop the windowed select accepts is the windowThreshold
(which should be a number type) - although I'm happy to reopen if anyone can figure out how to add typings for that.
Hi, I'm using this amazing library in a nextjs+typescript project and I didn't get the right types for example onChange newValue gets a type of unknown instead of SingleValue
I would like to try this in a project I'm working on, but it's using Typescript and I am unable to import the module. If the types match react-select, is it possible to import it with those or declared them based on those?