Skip to content

Tabulator fast theme not working in notebook #3104

@MarcSkovMadsen

Description

@MarcSkovMadsen

Panel 0.12.6

import panel as pn

pn.extension('tabulator', sizing_mode="stretch_width")

from bokeh.sampledata.autompg import autompg_clean as df
df.head()

pn.widgets.Tabulator(df, pagination='remote', page_size=5)

pn.widgets.Tabulator(df, pagination='remote', page_size=5, theme="fast")

image

Solution

As the fast theme will only work inside a Fast template on a server it would be really nice to just set the theme to the default, simple or site if running in a notebook environment.

Workaround

def environment():
    try:
        get_ipython()
        return "notebook"
    except:
        return "server"

if environment()=="server":
   theme="fast"
else:
   theme="site"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions