You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a form field component with named Slot to put specific content at a specific place, but named Slot are not projected through child component:
If it's not a bug, I think this would be a very convenient feature for managing logic in a context, for example :
exportconstFormField=component$(()=>{conststate=useStore({errors: {}});useContextProvider(FormFieldContext,state);return<divclass="field"><divclass="input-container"><Slot/></div><Slotname="error"/><Slotname="hint"/></div>;});exportconstFormError=component$(({ name }: FormErrorProps)=>{constfieldState=useContext(FormFieldContext);if(nameinfieldState.errors)return<spanq:name="error"class="error"><Slot/></span>})exportconstFormHint=component$(({ name }: FormErrorProps)=>{constfieldState=useContext(FormFieldContext);if(nameinfieldState.errors)return;return<spanq:name="hint"class="hint"><Slot/></span>})
Here I can position the children where I want and I can apply some logic thanks to the context.
Which component is affected?
Qwik Runtime
Describe the bug
I'm building a form field component with named Slot to put specific content at a specific place, but named Slot are not projected through child component:
If it's not a bug, I think this would be a very convenient feature for managing logic in a context, for example :
Here I can position the children where I want and I can apply some logic thanks to the context.
Reproduction
https://stackblitz.com/edit/qwik-starter-bu23cy?file=src/routes/index.tsx
Steps to reproduce
No response
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: