FileDownload widget with Tabulator

I am trying to display a table with the Tabulator widget and a download button side-by-side. I can get it to work, but the download button appears first, before the table. Is there a way to enforce the order of widget appearance in the pn.Row() call?

MWE:

import numpy as np, pandas as pd
from io import StringIO
import panel as pn

pn.extension('tabulator')

df = pd.DataFrame({'A':[1,2,3],'B':['x','y','z']})
sio = StringIO()
df.to_csv(sio,index=False)
_ = sio.seek(0)

T1 = pn.widgets.Tabulator(df,show_index=False,theme='modern',disabled=True)
button = pn.widgets.FileDownload(file=sio,
                                 label = 'Download Table',
                                 filename='table.csv',
                                 auto = False,
                                 button_type='primary',
                                 width=150,
                                align='start',
                                margin = 25)
pn.Row(T1,button)

Seems to work with your code:
image

Sorry, I should have been clearer. The button appears before the table, and then moves over to the right when the table is drawn. Not a major issue but a visual annoyance.

1 Like

What you see is the page rendering. And apparently the rendering the table takes a bit of time.

I would say “live with it”. With the small example its not a problem. But if its really a large loading delay try posting a video and minimum, reproducible example. Then I could take a second look.