Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabulator fast theme not working in notebook #3104

Open
MarcSkovMadsen opened this issue Jan 15, 2022 · 0 comments
Open

Tabulator fast theme not working in notebook #3104

MarcSkovMadsen opened this issue Jan 15, 2022 · 0 comments
Labels
component: tabulator Related to the Tabulator widget type: bug Something isn't correct or isn't working
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Jan 15, 2022

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"
@MarcSkovMadsen MarcSkovMadsen added the TRIAGE Default label for untriaged issues label Jan 15, 2022
@maximlt maximlt added the component: tabulator Related to the Tabulator widget label Mar 22, 2022
@philippjfr philippjfr added type: bug Something isn't correct or isn't working and removed TRIAGE Default label for untriaged issues labels Feb 17, 2023
@philippjfr philippjfr added this to the next milestone Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabulator Related to the Tabulator widget type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

3 participants