Open Janpot opened 9 months ago
~~Yeah this is a bit messy, there were always a few issues like this when supporting custom components with slots, I guess there might still be some. This might be a regression too as it probably worked before, it should be covered by tests.~~ I misunderstood the issue, nevermind.
Is this bug only to replace elm.props.children with elm.props.$$element?”
@Janpot There aren’t many bugs in the issue list that I can fix. So, would I like to ask for some requirements that are not included in the issue list?
Steps to reproduce
Link to live example: (required)
Steps:
Create a custom component:
Current behavior
The button doesn't appear in the hierarchy explorer
Expected behavior
The button appears in the hierarchy explorer. Just like it does when you replace
notChildren
the custom component withchildren
Context
Noticed here. It looks like to solve this correctly, we need to signal in our dom when something is an element/template, independently from the components. I'm trying to introduce an
{ $$element: {...} }
bindable property in the app dom and replace theelm.children
property with a "children" property underelm.props.children
that has that$$element
form.This is a symptom of a broader issue I'm experiencing opening up the Toolpad custom components API.
Your environment
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```npx @mui/envinfo
Search keywords: children