Closed Thomas-Boi closed 1 year ago
hi @Thomas-Boi, thanks for catching it and for the suggestion! Yeah, I agree that the documentation of TableRow
could be improved so it's consistent with the TypeScript typings. I forgot to add that prop to the JSDoc documentation 🤦
I'll work on it sometimes tonight or tomorrow.
This should be updated in the newest version 3.9.1. Details can be seen in this section: https://github.com/imballinst/react-bs-datatable/blob/v3.9.1/api/modules/components_TableBody.md#tablerow.
Let me know if you have more feedback. Thanks for report this issue!
Sweet, thank you for working on this so quickly 👍
Hello @imballinst ,
I found a problem that I missed during testing. When I render the rows using custom rows (see this sandbox, line 44 and 56, the checkbox will fail when I click them. After looking through the code, I found that adding
rowIdx
will fix the problem.Suggested Solution This only happens during customization so it should be up to the user to address it. However, it'd be great if there's a Intellisense warning from Typescript that
rowIdx
is required. Updating the code docs might be necessary since this only break when checkbox is clicked androwIdx
is not provided. If I don't have checkboxes, the rows are rendered fine. I'll leave it up to you on how best to handle this.Current jsdoc with no
rowIdx