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

Do not error if Tabulator styler is undefined #2785

Merged
merged 3 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ Enhancements:

- Ensure user is warned if an extension was not loaded in time on server ([#2765](https://github.com/holoviz/panel/pull/2765))
- Allow Viewer classes to be served ([#2768](https://github.com/holoviz/panel/pull/2768))
- Add support for rendering `.ico` files and pathlib objects ([#2757](https://github.com/holoviz/panel/pull/2757))
- Add support for rendering `.ico` files and `pathlib` objects ([#2757](https://github.com/holoviz/panel/pull/2757))

Bug fixes:

- Fixed export of vtk.js module ([#2562](https://github.com/holoviz/panel/pull/2562))
- Fix broken `HTMLTemplateFormatter` on `Tabulator` ([#2730](https://github.com/holoviz/panel/pull/2730))
- Fix serialization issues of Panel components on ReactiveHTML ([#2743](https://github.com/holoviz/panel/pull/2743))
- Fix serialization issues of Panel components on `ReactiveHTML` ([#2743](https://github.com/holoviz/panel/pull/2743))
- Ensure `FlexBox` behaves like a layout and makes its children discoverable ([#2779](https://github.com/holoviz/panel/pull/2779))
- Ensure `Plotly` plots can be updated in tabs ([#2747](https://github.com/holoviz/panel/pull/2747))
- Fix embedding of Panel apps in Flask ([#2727](https://github.com/holoviz/panel/pull/2727))
- Ensure `Spinner` widget honors bounds when created from `Param` object ([#2740](https://github.com/holoviz/panel/pull/2740))
- Ensure `Tabulator` style does not disappear after resize event ([#2770](https://github.com/holoviz/panel/pull/2770))
- Fix `PeriodicCallback` errors ([#2764](https://github.com/holoviz/panel/pull/2764))
- Fix syncing of boolean types with URL parameters ([#2758](https://github.com/holoviz/panel/pull/2758))
- Ensure Tabulator `download_menu` applies kwargs to the filename `TextInput` ([#2763](https://github.com/holoviz/panel/pull/2764))
- Ensure `Tabulator.download_menu` applies kwargs to the filename `TextInput` ([#2763](https://github.com/holoviz/panel/pull/2764))
- Ensure `Tabulator` does not error when no Styler is defined ([#2785](https://github.com/holoviz/panel/pull/2785))

Documentation:

Expand Down
5 changes: 3 additions & 2 deletions doc/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Enhancements:

- Ensure user is warned if an extension was not loaded in time on server ([#2765](https://github.com/holoviz/panel/pull/2765))
- Allow Viewer classes to be served ([#2768](https://github.com/holoviz/panel/pull/2768))
- Add support for rendering `.ico` files and pathlib objects ([#2757](https://github.com/holoviz/panel/pull/2757))
- Add support for rendering `.ico` files and `pathlib` objects ([#2757](https://github.com/holoviz/panel/pull/2757))

Bug fixes:

- Fixed export of vtk.js module ([#2562](https://github.com/holoviz/panel/pull/2562))
- Fix broken `HTMLTemplateFormatter` on `Tabulator` ([#2730](https://github.com/holoviz/panel/pull/2730))
- Fix serialization issues of Panel components on ReactiveHTML ([#2743](https://github.com/holoviz/panel/pull/2743))
- Fix serialization issues of Panel components on `ReactiveHTML` ([#2743](https://github.com/holoviz/panel/pull/2743))
- Ensure `FlexBox` behaves like a layout and makes its children discoverable ([#2779](https://github.com/holoviz/panel/pull/2779))
- Ensure `Plotly` plots can be updated in tabs ([#2747](https://github.com/holoviz/panel/pull/2747))
- Fix embedding of Panel apps in Flask ([#2727](https://github.com/holoviz/panel/pull/2727))
Expand All @@ -29,6 +29,7 @@ Bug fixes:
- Fix `PeriodicCallback` errors ([#2764](https://github.com/holoviz/panel/pull/2764))
- Fix syncing of boolean types with URL parameters ([#2758](https://github.com/holoviz/panel/pull/2758))
- Ensure Tabulator `download_menu` applies kwargs to the filename `TextInput` ([#2763](https://github.com/holoviz/panel/pull/2764))
- Ensure `Tabulator` does not error when no Styler is defined ([#2785](https://github.com/holoviz/panel/pull/2785))

Documentation:

Expand Down
4 changes: 3 additions & 1 deletion panel/widgets/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ def _length(self):
return len(self._processed)

def _get_style_data(self):
if self.value is None:
if self.value is None or self.style is None:
return {}
df = self._processed
if self.pagination == 'remote':
Expand All @@ -866,6 +866,8 @@ def _get_style_data(self):
styler = df.style
except Exception:
return {}
if styler is None:
return {}
styler._todo = self.style._todo
styler._compute()
offset = len(self.indexes) + int(self.selectable in ('checkbox', 'checkbox-single'))
Expand Down