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

Styling does not properly render with Tabulator header filters on version 1.1.0 #5085

Closed
enismaxim1 opened this issue Jun 9, 2023 · 2 comments · Fixed by #5148
Closed

Styling does not properly render with Tabulator header filters on version 1.1.0 #5085

enismaxim1 opened this issue Jun 9, 2023 · 2 comments · Fixed by #5148

Comments

@enismaxim1
Copy link
Contributor

enismaxim1 commented Jun 9, 2023

Panel version: 1.1.0

Styling on tables does not render properly when paired with header filters. If we add a filter to a column, then if a given value is filtered out of the table, the table loses the styling on the element when the element appears back in the table data. In the example below, when typing "-1" into the filter then clearing it, you will observe that the "-2" element loses the red coloring.

(For jupyter notebook)

import panel as pn
import pandas as pd
pn.extension('tabulator')
df = pd.DataFrame({
    'a': ['1', '-1', '2', '-2']
}, 
)

header_filters = {
    'a': {'type': 'input'}
}

tb = pn.widgets.Tabulator(df, header_filters=header_filters, layout = 'fit_columns')
tb.style.applymap(lambda val: 'color: red' if int(val) < 0 else '')
tb
Screen.Recording.2023-06-09.at.11.46.03.AM.mov
@hoxbro
Copy link
Member

hoxbro commented Jun 9, 2023

Try upgrading to 1.1.

@enismaxim1 enismaxim1 changed the title Styling does not properly render with header filters Styling does not properly render with Tabulator header filters on version 1.1.0 Jun 12, 2023
@enismaxim1
Copy link
Contributor Author

Try upgrading to 1.1.

Bug still exists on version 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants