From a03d71c61aa7a509031d2bbdce94dd7a6642e1d2 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Mon, 9 Sep 2024 22:28:59 +0100 Subject: [PATCH] Call new DataTable only on table objects --- docs/changelog.md | 8 ++++++++ src/itables/html/datatables_template.html | 3 +++ src/itables/version.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index c843540f..4de95364 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,14 @@ ITables ChangeLog ================= +2.2.2-dev (2024-09-??) +------------------ + +**Fixed** +- We have fixed a HTML pop up warning when displaying Pandas Style objects in Quarto ([#317](https://github.com/mwouts/itables/issues/317)) +- The dependencies of the Streamlit component have been updated ([#323](https://github.com/mwouts/itables/pull/323)) + + 2.2.1 (2024-09-22) ------------------ diff --git a/src/itables/html/datatables_template.html b/src/itables/html/datatables_template.html index da686119..81abd415 100644 --- a/src/itables/html/datatables_template.html +++ b/src/itables/html/datatables_template.html @@ -4,6 +4,9 @@ import {DataTable, jQuery as $} from 'https://www.unpkg.com/dt_for_itables/dt_bundle.js'; document.querySelectorAll("#table_id:not(.dataTable)").forEach(table => { + if (!(table instanceof HTMLTableElement)) + return; + // Define the table data const data = []; diff --git a/src/itables/version.py b/src/itables/version.py index 1a7743d7..70358218 100644 --- a/src/itables/version.py +++ b/src/itables/version.py @@ -1,3 +1,3 @@ """ITables' version number""" -__version__ = "2.2.1" +__version__ = "2.2.2-dev"