progress(args: ProgressEventArgs) {
if(this.isCompleted) {
this.progressObj.progressComplete();
this.isCompleted = false;
}
}
|
There is a way to show the progress without setting a duration?
In your example, you're setting 10 seconds as the duration but it doesn't look like a good solution.
I'd like to show the progress when the user clicks the button and stop when the process has been done. But in some cases, the process could take more or less time and the spinner button may be shown or hide when has not to.
Do you have an example or documentation for this cases?
<button ejs-progressbutton #progressObj content="Spin Left" [isPrimary]="true" [duration]="isDuration" (progress)="progress($event)"></button>
|
export class AppComponent {
@ViewChild('progressObj')
public progressObj: ProgressButtonComponent;
isDuration: number = 1000 * 60 * 59 + 59 * 1000;
onStart() {
this.progressObj.start();
}
onStop() {
this.progressObj.progressComplete();
}
}
|