-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Slot Forwarding Reactivity #7021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Your example is too complicated. Working example: https://svelte.dev/repl/c5841a328c6f490f960388906e9bf184?version=3.44.3 This is related to you calling Change |
@locriacyber The example is not too complicated and provides a reduced test case for a real bug. I am not looking for workarounds, I am looking for the bug to be resolved. |
@Rich-Harris I've seen quite a few rfc's and pr's around slot forwarding and reactivity but no work arounds for common every day patterns. I'm not sure runes would completely solve this and no comment from team. Would be a great scenario for runes testing. Basically, what I've seen is myself and others trying to build table components with a header / footer or row components that have slots and then have more derived example like table with paging component that tries to forward these slots but forward existing variables and default content. This breaks down really quick, very verbose and by the time you get to the grandparent level completely unusable. references: |
…and had to use writables for page. sveltejs/svelte#7021
* Created new sveltekit project * Added VS Code launch support for svelte. * Added tailwind and dasiyui * Added helpful resources * Added models generated from swagger. * WIP Added login page * Updated login * Fixed launch config and updated login styles * WIP - login page validation work. * Added api client. * Added problem details * Fixed tests * Fixed tests * WIP Problem details. * Login page refactor * Some cleanup and get events list page * Minor * Store token in localstorage, redirect back to page after login * Logout page * Added api launch config * Fixed formatting. * Change default proxy port to match API. Some work on OAuth login. * Login page fixes * Fixed login page * Swagger fixes * Google login working * Adding other oauth providers * State is google specific * Added shared layout for auth pages. * Few minor oauth updates * Fixed merge build errors * Fixed build errors * Update deps * Applied linting * Regenerated models after Nullable reference types * Added default templates npx swagger-typescript-api generate-templates -o api-templates * Updates to client side model generation * Added ability to pull in fluent validation rules into swagger. * Updated generation * more generation improvements * Improved code gen * More code gen fixes * Updated signup model validation * code gen improvements * Removed constructor * Some cleanup of problem details / validation * Updated swagger config * WIP: MiniValidation with automatic problem details DamianEdwards/MiniValidation#51 * Login and logout flow + dashboard with auth detection. * Reverted some model state changes * Reworked how api client redirects * Added websockets and layout auth redirection * Added samples for both paging and infinity paging * Updated to tanstack query (other one was deprecated) * More example resources * Updated deps * Added paging helpers to json response * Updated server response types and base summary model * Added Events Table component which supports column selection, default summaries (WIP) * Pushed summary updates * FetchClient changes to add middleware and make it more generic * Add global default options to FetchClient, setup global model validator, and global middleware to redirect on 401. * Some small fixes. * some fetch updates * Fixed build warnings * Early WIP - Taillog component * Greatly improved summaries * some query client work * WIP event tail log * Always return search tokens * Updated deps * Added default public env file * Conditionally turn off account creation * Moved oauth to use env * Added exceptionless client * Fixed client warnings and errors by adding trace logging. * changed file type of hook * Fixed app login * Fixed summary formatters * More efficient events tail log. * Added temporary drawer * Added live mode, start of pager. * Moving app base to /next, more FetchClient updates, fix unmount code for eventstail component. * Some styling * More style * Conditionally render summaries * Added new websocket message component to streamline how we listen to events * Working on getting both client apps to run together * Remove lint from build * Handle fallback for /next client app * Fixed logo * Change URL to /next for SPA startup * Change launchUrl to match SPA url * Some paging updates * Added paging summary * Fixed paging * Fixed paging * Fixed the pager on mobile. * Created generic table component (WIP) * forward events https://learn.svelte.dev/tutorial/event-forwarding * Ensure json doesn't get new line inserted * Fixed summary tests * Fixed validation tests * Fixed all tests * Fixed bad auto git merge * Fixed redirect * Added pagination helper. * WIP: Added column sorting * Added column picker * Added ability to navigate to the first page * Fixed binding issue * Fixed callback * Fixed drawer * Use store for drawer and for live view * WIP search and filtering * Added empty table message. * Workaround for $$Generic sveltejs/svelte-eslint-parser#306 * Fixed linting errors, updated deps * Use global fetch / loading * Updated deps * Work arounds for slot forwarding, couldn't reuse let:variable syntax and had to use writables for page. sveltejs/svelte#7021 * use persisted storage for events column options * WIP events drawer * Updated deps * Rearranged models a bit and pulled in some models from the exceptionless client * Added components for time formatting * WIP: Events drawer and overview. * Fix issue with code formatter changing line endings and causing git issues. Turn daisyui banner off. * Parallelize build * Events Sidebar * Ran formatting * Try building just exceptionless all in one image during docker build step * Don't run client tests yet * Try only building app docker image * Set artifact retention * Tweak how we start docker services * Don't wait for docker compose * Debug * Try different approach * Checkout on deploy * Try different docker build * Another parallel approach * Break out deploy * More build tweaks * Add code coverage * Use run-all to run multiple tasks * Revert some CSP policy changes * Comment out unused code to pass lint rules * Allow http gravatar * Add missing logo back * increased sidebar width * WIP - Error and Simple error stack traces * Fixed http file * Updated deps * Reworked how stack traces are rendered * removed extra whitespace. * Whitespace formatting * More styling fixes * make stack trace look nicer * Updated deps * WIP: Clickable filters with ability to enter custom keyword filters. * rearranged loading rendering order in component due to global loader. * Renamed functions * Added more search + log level component * Fixed warning --------- Co-authored-by: Blake Niemyjski <[email protected]>
Describe the bug
When Component A uses a slot from Component B, which forwards the slot to Component C, reactivity breaks if the Component A reassigns a variable that is passed in two separate props to Component B.
This is pretty hard to explain abstractly, but is easy to see in the provided reproduction.
Reproduction
shows bug instantly (bug automatically triggered in
onMount
): https://svelte.dev/repl/09e21fce26c948258928f17b1545a21b?version=3.44.3shows bug on user interaction (clicking the button triggers the bug): https://svelte.dev/repl/e09c2a49a4f344d8b81eb03f9dce251e?version=3.44.3
This bug is caused by
App
passingthing
inside thethings
property as well as reassigningthing
in theonOptionsChange
callback property.Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: