26 Matching Annotations
- Jun 2021
-
github.com github.com
-
'set-cookie': response.headers.get('set-cookie')
-
If you do need to passthrough your mydomain.com cookies to a thirdparty.com domain, you can technically already do that now by implementing it as an endpoint and calling fetch('/my-endpoint')
-
I don't really want to re-implement all of my api endpoints to make this work. Is there a way to "mask" the thirdparty endpoints to pass through the cookies?
-
- Jan 2021
-
github.com github.com
-
allow <slot> to be part of a slot
-
I want to make some add-ons or wrappers on components e.g BigButton.svelte <script> import Button from './Button.svelte' </script> <Button fz="16" h="64" {...$$props}> <slot slot="prepend" name="prepend" /> <slot /> <slot slot="append" name="append" /> </Button>
-
Related to #1824, can do <svelte:component this={Bar}> <slot></slot> <slot name="header" slot="header"></slot> </svelte:component> <script> import Bar from './Bar.svelte'; </script> as a forwarding workaround
-
-
-
I am trying to implements this usecase (a generic lazy loader component which forwards slots/events to the "real" component).
-
-
github.com github.com
-
In 3.29.0 you can now use <slot slot='...'> to forward slots into a child component, without adding DOM elements.
-
Would love to see passthrough slots to create superset components, for example Table and TableWithPagination (table slots for TableWithPagination could be passed through to Table).
-
- Nov 2020
-
github.com github.com
-
All standard UI events are forwarded on components, input events ("input" and "change") are forwarded on input components, and all MDC events are forwarded.
-
You can add props to lower components and elements with things like input$maxlength="15".
-
You can add actions to the components with use={[Action1, [Action2, action2Props], Action3]}.
-
-
-
github.com github.com
-
All standard UI events are forwarded.
-
class: '' - A CSS class string.
-
use: [] - An array of actions and/or action/property arrays.
-
- Oct 2020
-
github.com github.com
-
In a later major, we'd stop extracting key from props and therefore props is now just passthrough.
-
- Sep 2020
-
github.com github.com
-
There are usually very little amount of properties that a component relays on
-
-
github.com github.com
-
The point of the feature is to not rely on the third-party author of the child component to add a prop for every action under the sun. Rather, they could just mark a recipient for actions on the component (assuming there is a viable target element), and then consumers of the library could extend the component using whatever actions they desire.
Tags
- flexibility
- extensibility
- component/library author can't consider/know ahead of time all of the ways users may want to use it
- run-time dynamicness/generics vs. having to explicitly list/hard-code all options ahead of time
- pass-through arguments/props/options
- Svelte: action (use:)
Annotators
URL
-
-
svelte.dev svelte.dev
-
If you want to listen to an event on some deeply nested component, the intermediate components must forward the event.
-
-
-
We should also allow passing unrecognised props to the rendered component. eg: tabindex might be required on some instances of a component, and not all. Why should developers have to add tabindex support to their components just that it may potentially be used
Glad to hear this is solved now: $restProps
-
You could do something like this instead while maintaining complete control of where different props go. <div class="wrapper> <div {...$$props} > ... </div> </div>
-
- Aug 2020
-
github.com github.com
-
All of the components should allow passing MUI configuration properties to them so that they can be easily customized. In the case of RFF and MUI components with deeply nested structures of multiple subcomponents, you can pass the properties in with sepecial top level properties. This is very hard to document fully without making a mess, so please refer to the source code and demos for examples.
-
- Nov 2019
-
gist.github.com gist.github.com
-
propsToPass
-
-
github.com github.com