Hey I'm trying to get a progress bar to animate in...
# clikt
a
Hey I'm trying to get a progress bar to animate inside of a table, but I must be missing something, it renders it once, and then animates it below the table:
Copy code
val progressLayout = progressBarLayout {
			spinner(Spinner.Dots())
			marquee(terminal.theme.warning("Running conversion"), width = 24, align = TextAlign.CENTER)
			percentage()
			progressBar()
			completed(style = terminal.theme.success)
		}
		val progress = progressLayout.animateInCoroutine(t)

		t.println(
			Panel(
				expand = true,
				content = horizontalLayout {
					column(0) { width = Expand(1) }
					column(1) {
						width = Auto
					}
					column(2) { width = Expand(1) }

					cell(EmptyWidget)
					cell(
						table {
							captionTop("Input Dictionary")
							body {
								row("Input File", path.name)
								row("Size", inputMetadata.size.toString() + " Bytes")
								row("Entries", numEntries)
								row {
									cell(
										progressLayout.build(null, 0, TimeSource.Monotonic.markNow())
									) {
										columnSpan = 2
									}
								}
							}
						}
					)
					cell(EmptyWidget)

				},
				title = Text("FDIC Converter")
			)
		)

		val scope = CoroutineScope(Dispatchers.Default)
		scope.launch { progress.execute() }