Closed chipkent closed 3 weeks ago
@chipkent this looks like an issue that @AkshatJawne is already working on to make it easier to use tabs: #489
In the meantime, you need to specify both ui.tab_list
and ui.tab_panels
within ui.tabs
, and have the keys match up: https://github.com/deephaven/deephaven-plugins/tree/main/plugins/ui/docs#tabs
from deephaven import ui
from deephaven.plot import express as dx
stocks = dx.data.stocks()
@ui.component
def table_tabs(source):
return ui.tabs(
ui.tab_list(
ui.item("Unfiltered", key="Unfiltered"),
ui.item(ui.icon("vsGithubAlt"), "CAT", key="CAT"),
ui.item("DOG", key="DOG"),
),
ui.tab_panels(
ui.item(source, key="Unfiltered"),
ui.item(source.where("sym=`CAT`"), key="CAT"),
ui.item(source.where("sym=`DOG`"), key="DOG"),
),
flex_grow=1,
)
tt = table_tabs(stocks)
Closing as a duplicate https://github.com/deephaven/deephaven-plugins/pull/489
Version:
0.34.3
1) If the following code is run, the tab panel does not appear.
2) if the code is run without the
ui.item
wrappings underui.tabs
, the UI widget never appears.