-
Notifications
You must be signed in to change notification settings - Fork 8
Tables #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tables #258
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This works. Just have to appease the testing code. |
…ing rows clickable
@52 Requested Max's review. next/link work won't because it is in a table. Using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple additional points:
-
Delete the
saving-test
directory and move the tests back. (No need to move any files around) -
Since you've made a change to the core component, the
votes-table
will now also have clickable rows, that routes to someplace wrong. This would also need to be addressed.
@52 I've tried your suggestions already but will revisit it. |
Yes, you're accessing a property on a generic type, TS cannot guarantee that it exists. As for the issue of the "click-ability" being shared between votes & proposal tables:
...
export const DataTableVariants = ['proposal', 'vote'] as const;
export type DataTableVariant = (typeof DataTableVariants)[number];
On the right track, though! 👍 |
@52 Thanks, Max! I should've stuck with this path longer. Appreciate your notes. |
…a prop on a generic type
…onditionally render when variant passed in
@52 the prop isn't simply passed to the VotesTable. Adding |
@52 Solved :) by matching the expected type of the columns prop in the DataTable component to the columns being passed when using the VotesTable component. |
…nent to the columns being passed when using the VotesTable component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the following request is still needed:
- Delete the saving-test directory and move the tests back.
@52 the code works, so can you elaborate on your edit revisions? The only thing that "does not work" are two tests, which look like they need more customization support beyond the fix we just deployed for Next 13's lack of support for |
Resolved offline, closing in favor of another approach. |
Add click-ability feature to certain whole rows (main / proposal tables and not secondary / votes tables).