Contexts and resolved children
Hi, I'm trying to create a table component. The idea would be to have something like this:
Where the optional
I need to use the
I'd like to know if contexts are the correct approach here, and if so how to solve this issue with the resolved children.
Thanks!!
Where the optional
checkbox attribute should get propagated to the rows and headers so that a check box is added as the first column if checkbox == true. For that I'm trying to use a context, not sure if it's the best approach but I tried a couple other things and none work. However, as you can see here in the playground, when I try to separate the headers and rows like this:I need to use the
children() function (at least that's the only way I know of to achieve this), and this doesn't play nice with the context since the children get evaluated before the context provider is set up, and so the default context value is always used and the checkboxes never show up.I'd like to know if contexts are the correct approach here, and if so how to solve this issue with the resolved children.
Thanks!!
Quickly discover what the solid compiler will generate from your JSX template
