Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Count Columns in Tables #20

Open
humphreyja opened this issue Jan 5, 2018 · 1 comment
Open

Count Columns in Tables #20

humphreyja opened this issue Jan 5, 2018 · 1 comment

Comments

@humphreyja
Copy link
Member

humphreyja commented Jan 5, 2018

So for TableGroup, we should include a method that counts the children under it so that it can calculate the appropriate flex size. For example currently if you have a table group with size medium, it applies a flex size of 4 (I think). In order to get the children to be sized correctly when the group is not being used (so basically the children should behave as if they are not in a group when the screen is big enough), the children would have to be size 2 each or something. Maybe we can actually calculate the sizes and apply the correct flex sizes based on child count and size. So 2 medium children would need a table group of size 8.

https://reactjs.org/docs/react-api.html#reactchildrencount

@humphreyja
Copy link
Member Author

Better idea. Have groups manage the breakpoints themselves. Basically use the group as a passthrough (hopefully I can do that) so that the columns are unchanged until the break point is reached, then insert the group divs into the DOM to break the table apart.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant