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
my suggestion is to still pass the parent data but not as a prop to modals, but through context, this way is more opt-in and less annoying.
That's an interesting suggestion.
I'm definitely not satisfied with how this works now, it's a very manual process to ensure parity for all props. The Context API wouldn't solve this issue either. At least if each value is provided piecemeal. Ideally what we need is a way to inherit or retrieve any and all values from the parent automatically (props, functions, etc).
There is some low level access Svelte provides for this, but I've been informed it's part an API that will likely change in the future. My hope is to test our options again when Svelte 5 drops. I'm really hoping for something that makes this more automatic.
In the meantime I think the Context API change can be reserved as our fallback plan.
In an effort to prepare for Skeleton v3, we're consolidate some related issues down to a single ticket. This will ensure that we can see the full context of requests when the time comes to refactor and update this feature going forward. If you wish to add additional feedback or suggestions, please so here:
Current Behavior
Custom modals that don't use the
parent
prop I get the<SomeModal> was created with unknown prop 'parent'
Expected Behavior
not seeing the unknown prop warning in the console when not using the
parent
prop in Modal ComponentsSteps To Reproduce
export let parent
Link to Reproduction / Stackblitz
No response
More Information
my suggestion is to still pass the parent data but not as a prop to modals, but through
context
, this way is more opt-in and less annoying.The text was updated successfully, but these errors were encountered: