Replies: 1 comment 1 reply
-
|
Perhaps try |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So, I am trying to embrace the new
+layoutand.datafunctionality, and most of if works quite well, but I am running into a (maybe mental) brick wall concerning the following problem. I have a semi-complex route consisting of/cloud/[...id]which shows an overview over a cloud service and/cloud/[..id]/configurationwhich can be used to edit its configuration. I use the following files (edited for brevity):(I am running in a non-SSR context)
cloud/[...id]/+layout.ts(to fetch the cloud service data for the current id)cloud/[...id]/+layout.svelteto render a "top bar" with a breadcrumb and a tab barcloud/[...id]/+page.svelterenders the cloud service overviewcloud/[...id]/configuration/+page.svelterenders the edit pageWhat I want to achieve is that as soon as I click on save, that the name of the cloud service updates accordingly in the UI. However, I cannot get this to work.
Changing the data with bindings on the input field changes the contents of the
dataon the current (configuration) page, but not the data inside$page.If then navigate to the overview, it at least changes the contents on $page and the contents that is rendered within
cloud/[...id]/+page.svelteupdates, but the contents within thecloud/[...id]/+layout.svelte(the top bar) stays the same.Do I somehow need to trigger the load again? But fetching this from the server would be unnecessary since I already have the recent information on the return of the
updateCloudServicecall. Maybe I need a store to handle this? I would appreciate some points on this, as I am probably doing something fundamentally wrong here.PS: The whole code is also available here clouditor/clouditor-medina-ui#173
Beta Was this translation helpful? Give feedback.
All reactions