diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b60d190812dadb172027a9ba21dd79247164ef8..0ad6597cd79421acbd541d45a43b1f8e57d93656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +## 2024-01-22 + +- fix exception [#132](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/132) + ## [3.55.0] - 2023-11-29 ### Add Features diff --git a/playground/datatable/index.html b/playground/datatable/index.html index 6aaefbf65a89153e4387f3aacf1b349d6bbde499..fc75f40151064824809087755f6a9adfaa26d06a 100644 --- a/playground/datatable/index.html +++ b/playground/datatable/index.html @@ -62,9 +62,9 @@ <monster-collapse id="my-collapse" data-monster-role="filter-collapse"> <div class="flex"> - <monster-tabs style="width: 100%" data-monster-option-classes-button="monster-theme-primary-2" id="filtertabs"> + <div data-monster-button-label="Filter" data-monster-state="active" class="active"> - <monster-datatable-filter id="listfilter1" slot="filter" data-monster-option-storedconfig-selector="#filtertabs"> + <monster-datatable-filter id="listfilter1" slot="filter"> <label data-monster-label="OID1" id="oid1" data-monster-template="${value | call:range:oid}"> RANGE OID @@ -96,7 +96,7 @@ </monster-datatable-filter> </div> <div data-monster-button-label="SDAFASDFDS"></div> - </monster-tabs> + </div> </monster-collapse> diff --git a/source/components/datatable/datatable.mjs b/source/components/datatable/datatable.mjs index 9c455f7d0014b7ca521658e4d6433ff7b8a79027..feb87ac491f1c7de3b7ebf998743061f05e96114 100644 --- a/source/components/datatable/datatable.mjs +++ b/source/components/datatable/datatable.mjs @@ -289,10 +289,6 @@ class DataTable extends CustomElement { } }).then(() => { - - const headers = this.getOption("headers", undefined); - console.log(headers); - try { initGridAndStructs.call(this, config, headerOrderMap); } catch (error) { diff --git a/source/dom/util.mjs b/source/dom/util.mjs index 4507aa83478ccdab3079fcff4b1dc01a878507d9..ae56a15c519aa57815457f9874ea69b464523771 100644 --- a/source/dom/util.mjs +++ b/source/dom/util.mjs @@ -220,7 +220,7 @@ function findElementWithIdUpwards(element, targetId) { * @since 3.55.0 */ function findElementWithSelectorUpwards(element, selector) { - if (!element) { + if (!element||!selector) { return null; }