Answer the question
In order to leave comments, you need to log in
How to simulate progress bar when changing thong?
I have an object with statuses, suppose:
const validationProgressSteps: IterableObject<string[]> = {
firstStep: ['one', 'two'],
secondStep: ['three', 'four'],
thirdStep: ['five', 'six'],
fourthStep: ['seven', 'eight'],
}
public handleValidationProgress(status: string, id: number): number {
const fileInTable: FileTableItem | undefined = this.uploadedFiles.find
((item: FileTableItem) => item.fileId === id);
if(fileInTable) {
this.validationProgressSteps.firstStep.filter((item: string) => {
if (status === item) {
const progressBar = setInterval(() => {
if (this.progressStatusBar === 30) {
clearInterval(progressBar);
} else {
this.progressStatusBar += 1;
}
}, 1000);
}
});
}
return this.progressStatusBar;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question