I'm trying to use qgrid to visualize dataframes together with some widgets. I have some issues displaying a grid inside a tab, if it is not active at the load.
import pandas as pd
import ipywidgets as widgets
import numpy as np
import qgrid
out1 = widgets.Output()
out2 = widgets.Output()
data1 = pd.DataFrame(np.random.normal(size = 10))
data2 = pd.DataFrame(np.random.normal(size = 10))
with out1:
display(qgrid.show_grid(data1))
with out2:
display(qgrid.show_grid(data1))
tab = widgets.Tab(children = [out1, out2])
tab.set_title(0, 'First')
tab.set_title(1, 'Second')
display(tab)
The code above produce working version for the first tab
But the second one is empty
More surprising is the fact that my attempt to "inspect" this in Chrome fixes my second tab, but hides output from the first.
Any suggestions?