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

Implement hierarchical aggregation for Tabulator #2624

Merged
merged 4 commits into from
Aug 9, 2021

Conversation

philippjfr
Copy link
Member

Screen Shot 2021-08-09 at 11 12 21 AM

Fixes #2619

panel/widgets/tables.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 9, 2021

Codecov Report

Merging #2624 (37da0c8) into master (b220588) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2624   +/-   ##
=======================================
  Coverage   83.09%   83.09%           
=======================================
  Files         184      184           
  Lines       23295    23309   +14     
=======================================
+ Hits        19356    19369   +13     
- Misses       3939     3940    +1     
Impacted Files Coverage Δ
panel/tests/widgets/test_tables.py 99.30% <ø> (ø)
panel/models/tabulator.py 94.28% <100.00%> (+0.16%) ⬆️
panel/widgets/tables.py 83.30% <100.00%> (+0.04%) ⬆️
panel/io/callbacks.py 70.45% <0.00%> (+0.33%) ⬆️
panel/pane/plot.py 59.18% <0.00%> (+1.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b220588...37da0c8. Read the comment docs.

@philippjfr philippjfr merged commit a0af7ab into master Aug 9, 2021
@philippjfr philippjfr deleted the hierarchical_tabulator branch August 9, 2021 12:51
const formatted = column.formatter.doFormat(cell.getRow(), cell, cell.getValue(), null, null)
const node = div()
node.innerHTML = formatted
return node.children[0].innerHTML
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This completely breaks HTMLTemplateFormatter:

pn.widgets.Tabulator(pd.DataFrame({'link': ['foo']}), 
                     formatters={'link': HTMLTemplateFormatter(
                         template='<a href="<%= value %>">Link</a>'
                     )})

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can you open an issue?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, #2730

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 this pull request may close these issues.

self.hierarchical is never defined in a Tabulator with multi indexes, but required by _get_column_definitions
2 participants