Open tomasherceg opened 7 years ago
We should prefer simple solution that will not require users to write their own JavaScript. I think it's good enough to prepare some decorator or active property.
I think that we should have
<dot:PostbackIsRunning CssClass=''
- A postback handler that will attach a css to the control when the postback is running.PostBack.IsBusyCssClass="processing"
- an active property that will attach the postback handler_page.PostbackRunning
a property that can be used in binding anywhere. We could also have _queue.PostbackRunningQueue [ == "MyPostbackGroup"]
that would return a queue of the running postback.@tomasherceg What do you think?
We should have a discussion about the right solution - I like PostBack.IsBusyCssClass
for simple scenarios and full postback handler for all other scenarios.
We have heard some complaints about the following scenario: "I need to run an animation on a button while a postback is running".
There are a several ways how to do this in DotVVM:
beforePostback
andafterPostback
events using javascript (it can disable all buttons globally, or only the button which fired the postback, when used e.g. from a custom knockout binding)To simplify the syntax, there are also several options:
Button
control and create e.g. theAnimatedButton
controlDecorator
However, I agree that neither of the methods is simple.
I can imagine several solutions:
PostBack.IsBusyCssClass="processing"
)