Closed mrf345 closed 4 years ago
@mrf345 Thank you, this is awesome. Will test it out today.
Awesome, thanks for taking a look.
@mrf345 I've tested it now, sorry for the delay. A few things:
Otherwise works fine, great work!
This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/tbleckert/react-select-search/ea4uxd41o ✅ Preview: https://react-select-search-git-fork-mrf345-typescriptdefinition.tbleckert.now.sh
Hi @tbleckert , No worries and thanks for the well detailed remarks.
I've just fixed the exiting types, and added the ones that came after. Please let me know if i've missed any remark.
@mrf345 Nice, great work. I'll merge it in and include it in the next release
These types are not compatible for me (latest TypeScript). Based on the errors I was getting, DomProps
should look like this:
export type DomProps = {
tabIndex:number
onMouseDown:(event:MouseEvent<HTMLButtonElement>) => void
onKeyDown:(event:KeyboardEvent<HTMLButtonElement>) => void
onKeyPress:(event:KeyboardEvent<HTMLButtonElement>) => void
onBlur:(event:FocusEvent<HTMLButtonElement>) => void
value:string
disabled:boolean
}
I'm new to this library and don't know all the options,HTMLButtonElement
should probably be generic.
Problem:
Solution:
index.d.ts
Note:
filterOptions
since i wasn't able to find any mention of it anywhere in the code-base except in theREADME.md
. Search Results.renderValue
parameters to typeany
since i wasn't able to get the function to fire so i can inspect and map it's values accurately.Related issues:
68
Thanks so much for the awesome component ✨