Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

I am getting such an error in datatable.


I am getting such an error in datatable.

Uncaught TypeError: Cannot read properties of undefined (reading "innerHTML")


n = moment(e[5].innerHTML, "DD MMM YYYY, LT").format();


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Hi happy,

Glad to hear that. All the best with your projects!

Regards.



It was fixed when I updated list.js like this.
/dist/assets/js/custom/apps/subscriptions/list/list.js

"use strict";
var KTSubscriptionsList = function() {
var t, e, n, o, c, r
return {
init: function() {
(t = document.getElementById("kt_subscriptions_table")) && (t.querySelectorAll("tbody tr").forEach((t => {
const e = t.querySelectorAll("td")
})), (e = $(t).DataTable({
info: !1,
order: [],
pageLength: 10,
lengthChange: !1

})), document.querySelector("[data-kt-subscription-table-filter="search"]").addEventListener("keyup", (function(t) {
e.search(t.target.value).draw()
})), function() {
const t = document.querySelector("[data-kt-subscription-table-filter="form"]"),
n = t.querySelector("[data-kt-subscription-table-filter="filter"]"),
o = t.querySelector("[data-kt-subscription-table-filter="reset"]"),
c = t.querySelectorAll("select");
n.addEventListener("click", (function() {
var t = "";
c.forEach(((e, n) => {
e.value && "" !== e.value && (0 !== n && (t += " "), t += e.value)
})), e.search(t).draw()
})), o.addEventListener("click", (function() {
c.forEach(((t, e) => {
$(t).val(null).trigger("change")
})), e.search("").draw()
}))
}())
}
}
}();
KTUtil.onDOMContentLoaded((function() {
KTSubscriptionsList.init()
}));


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(