Skip to content

Commit

Permalink
Do not error if Tabulator styler is undefined (#2785)
Browse files Browse the repository at this point in the history
* Do not error if Tabulator styler is undefined

* Update changelog

* Fix if self.style is None
  • Loading branch information
philippjfr committed Sep 27, 2021
1 parent d873990 commit 9cdbea0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
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

0 comments on commit 9cdbea0

Please sign in to comment.