undefined slot props when component has slot attr
Hello guys, I have encountered a problem with slot props, the scenario of the issue is: When component A ( which have slot element and export slot props ) inserted in the named slot of component B ( have both named and default slot elements ) using the slot property and try accessing component A's slot props will results in "undefined" values, however, everything works fine if the component used as default slot
I have created a reproduction of the issue in REPL, please check out this link: https://svelte.dev/repl/c1284a4af1eb48768a2e66ece04abe8d?version=3.35.0
@meiseayoung <svelte:fragment slot="name" let:prop> is also working fine, the issue appears only when using component as a named slot
A component that has a slot attribute will not provide his slot props, but rather you will access the slot props provided by the direct parent
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have run into this situation this week as well.
Fortunately it can be worked around by wrapping the component with some element (i.e. 'div').
If this is not a bug however it is surprising and at best it's not properly documented.