-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Blazor] Enhance form and data-permanent is not enough control. #54117
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
@Bartmax thanks for contacting us. This is a different model than the one Blazor uses for enhanced navigation (more like update panel or the old MVC AJAX functionality) and for the time being we don't have plans to implement that type of feature. Is there a reason why updating the entire page doesn't work? |
As I said, it's not possible to keep parent elements with data permanent (in my sample, the modal open), while updating the inner form with validation. As soon as you put data-permament on an element, all childs updates are ignored. So any update via js to any parent of a part that needs to update wont be able to use data-permament. |
Thanks for contacting us. You can learn more about our triage process and how we handle issues by reading our Triage Process writeup. |
So you don't encourage users to use interaction via JavaScript, only wasm or blazor server. Noted. |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Right now, we can have data-permanent tags on many places of a webpage so when we submit a form o do some enhance nav those elements doesn't get diffed and works ok 👍
But what I find most interesting, when using forms, is that I want to be able to "only" diff inside a element and it's parents and care less for the rest of the page, so insted of doing data-permanent on every piece of dom i need to keep, i would like to specify a piece of dom i want to only get updated.
This also enables the scenario that you can keep parent elements while updating child elements (currently not posible)
Examples:
In this example, the modal is shown via some javascript so it updates to:
after submit, the modal closes (because the open class is not persisted).
If I add
<div class="modal" data-permanent=true>
then the form is not updated with validation errors.Describe the solution you'd like
What I would like in my scenario, is a way to specify which parts to update.
Where some identifier could be an element id, a component, or whatever, for example:
Additional context
No response
The text was updated successfully, but these errors were encountered: