Open berkinanik opened 1 year ago
HTMLDivElement
or HTMLButtonElement
) used for root and clickable remove elements which allow getRemoveFileProps
and getRootProps
to be properly types are added for useCSVReader
.js-docs for useCSVReader
hook
useCSVReader
hook returns the properly typed CSVReader
component
generic element type provides proper event handler, event and children render function's arguments proper types
first generic type is the parsed result's data type which affects return result type
results
object is now properly typed as ParseResult and thanks to properly type CSVReader and the hook. Its type is inferred using the handler onUploadAccepted
functions argument type
Thanks to properly typed children render function arguments and all the return types of those argument methods, now children render function is properly typed and proper types are inferred
Inferred types of those renderer func arguments, all that methods return proper props of the elements for the spread operation
All the events themselves and the handler function types are properly inferred
why hasn't this been merged yet :(
Thanks @berkinanik ❤️
@Bunlong can we merge this? it's awesome
This would be awesome to merge! @Bunlong
Any blocker here? @Bunlong would love to have this
resolves #149
useCSVReader
hook andCSVReader
component.CSSProperties
casting.might be considered as a breaking change proposal
Important parts are under: useCSVReader.tsx