You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importcliProgressfrom"cli-progress";// create new containerconstmultibar=newcliProgress.MultiBar({clearOnComplete: false,hideCursor: true,format: " {bar} | {filename} | {value}/{total}",},cliProgress.Presets.shades_grey);constb1=multibar.create(200,0);constb2=multibar.create(1000,0);b1.update(0,{filename: "Task 1 in progress"});b2.update(0,{filename: "Task 2 in progress"});setTimeout(()=>{// Task 1 completed, remove bar.multibar.remove(b1);},1000);
Expected behaviour:
After 1 second only 'Task 2 in progress' caption should left on screen.
Actual behaviour:
After 1 second 'Task 1 in progress' caption is still on screen, but 'Task 2 in progress' removed instead.
The text was updated successfully, but these errors were encountered:
khokm
linked a pull request
Sep 2, 2023
that will
close
this issue
importcliProgressfrom"cli-progress";// create new containerconstmultibar=newcliProgress.MultiBar({clearOnComplete: true,hideCursor: true,format: " {bar} | {filename} | {value}/{total}",},cliProgress.Presets.shades_grey);constb1=multibar.create(200,0,{clearOnComplete: true});constb2=multibar.create(1000,0,{clearOnComplete: true});b1.update(0,{filename: "Task 1 in progress"});b2.update(0,{filename: "Task 2 in progress"});setTimeout(()=>{// Task 1 completed, remove bar.multibar.remove(b1);},1000);
Seems like nothing has changed. Btw i'm using Windows Terminal, if it matters. clearOnComplete clears the screen only when all of the children bars are completed.
But in my case i want only one of bars to be removed, not waiting for others to complete.
I already fixed this in attached PR. Could you please merge it?
Expected behaviour:
After 1 second only 'Task 2 in progress' caption should left on screen.
Actual behaviour:
After 1 second 'Task 1 in progress' caption is still on screen, but 'Task 2 in progress' removed instead.
The text was updated successfully, but these errors were encountered: