Skip to content
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

Rerendering extensions when parameters change #145

Closed
luckyluggi opened this issue Jun 7, 2024 · 2 comments
Closed

Rerendering extensions when parameters change #145

luckyluggi opened this issue Jun 7, 2024 · 2 comments
Labels
blazor-v8 Applied to .NET 8.0 enhancement New feature or request piral-blazor Related to the piral-blazor npm package.
Milestone

Comments

@luckyluggi
Copy link
Contributor

We can pass Parameters to the component and they get inserted into every extension loaded into the slot.
When these Parameters change in the top component the component does not reload.

I know that i could inform the extension-components about any changes via events, but it would be much more convenient if the component could get informed and update itself automatically.

I have created an example project here:
https://github.com/luckyluggi/piral_example_for_multiple_issues

Open the /shop page and toggle the "switch"-button in the topbar.
This changes the boolean value in LayoutPilet\Components\Topbar.razor on line 23.
The value is passed to the Cart Extensions in the Topbar.Right extension-slot, but they are not updatet when this value changes.
To see a working example you can start the standard Blazor App BlazorApp\BlazorApp.csproj.

Do you see any chance this could be improved?

@luckyluggi luckyluggi added the enhancement New feature or request label Jun 7, 2024
FlorianRappl added a commit that referenced this issue Jun 10, 2024
@FlorianRappl FlorianRappl added this to the v17 milestone Jun 10, 2024
@FlorianRappl FlorianRappl added in-implementation Currently being implemented. blazor-v8 Applied to .NET 8.0 piral-blazor Related to the piral-blazor npm package. in-testing Currently in preview / being tested. and removed in-implementation Currently being implemented. labels Jun 10, 2024
@FlorianRappl
Copy link
Collaborator

This is now shipped in the previews of blazor (v17) and piral-blazor (1.6.0).

@luckyluggi
Copy link
Contributor Author

Thanks! I have tested it and it works 👍

@FlorianRappl FlorianRappl removed the in-testing Currently in preview / being tested. label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blazor-v8 Applied to .NET 8.0 enhancement New feature or request piral-blazor Related to the piral-blazor npm package.
Projects
None yet
Development

No branches or pull requests

2 participants