Option to keep sub-tasks expanded
muuvmuuv opened this issue · comments
I would like to show the user successes sub-tasks instead of just the main tasks. Would be great to have an option here, like showSubTasks
.
@muuvmuuv Do you find any solution on this?
Thanks
No @jasoncheng, unfortunately not.
@muuvmuuv @jasoncheng See: #131 (comment) (the lib has less features, but still have some like keeping sub-tasks expanded)
@muuvmuuv @jasoncheng This functionality exists but it's not documented very clearly. The default renderer, listr-update-renderer
has an option called collapse
that is true
by default. Setting this to false
will remove the collapsing behavior. You can pass the renderer options as part of the options when you create a Listr
instance.
So this will keep the subtasks expanded:
const listr = new Listr([
// ...
],
{ collapse: false }
);
Unfortunately, if you're using TypeScript the types will complain about this so you have to put a @ts-ignore
on the line before it.