Got this error when I added the property scrollY
Got this error when I added the property scrollY
Got this error when I added the property scrollY.
Could someone help me with this. Used 1.10.18 version
Uncaught TypeError: s.match is not a function
at _fnStringToCss (jquery.dataTables.js:5839)
at i.fn.init._fnScrollDraw (jquery.dataTables.js:5441)
at jquery.dataTables.js:6636
at Function.map (BundledJQuery.min.js:2)
at _fnCallbackFire (jquery.dataTables.js:6635)
at _fnDraw (jquery.dataTables.js:3507)
at _fnReDraw (jquery.dataTables.js:3550)
at _fnInitialise (jquery.dataTables.js:4732)
at loadedInit (jquery.dataTables.js:1294)
at HTMLTableElement.<anonymous> (jquery.dataTables.js:1306)
Answers
scrollY
is working on this page:https://datatables.net/examples/basic_init/scroll_y.html
The problem must be something specific to your environment. To help with debugging please post a link to your page or a test case replicating the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
$('#tblEvaluators').DataTable({
scrollY: "500px",
scrollCollapse: true,
paging: false,
destroy: true,
language: {
search: "INPUT",
searchPlaceholder: "Search Evaluator"
},
data: evaluators.data,
//ajax: {
// "url": 'Evaluators.aspx/GetAllEvaluators',
// "dataSrc": ''
//},
columns: [
{ "data": "FullName" },
{
"data": "GeneralRotationQueueFlag",
"render": function (data, type, row) {
return (data === true) ? '<i class="fas fa-check"></i>' : '';}
},
{
"data": "ActiveFlag",
"render": function (data, type, row) {
return (data === true) ? '<i class="fas fa-check"></i>' : '';}
}
],
createdRow: function (row) {
$(row).addClass('cursor-pointer evaluator-row');
},
columnDefs: [
{ className: "text-center", "targets": [1, 2] }
],
dom:
"<'row d-flex justify-content-around'<'col-4'B><'col-8'f>>" +
"<'row'<'col-12'tr>>" +
"<'row'<'col-12 text-center'i>>",
buttons: [
{
text: '<i class="fas fa-user-plus"></i> Add an evaluator',
attr: {
class: 'btn btn-outline-secondary btn-sm mt-1',
id: 'addEvaluator',
"data-toggle": 'modal',
"data-target": '#addEditEvaluatorModal'
}
}
]
});
Here is my Code
when I tried to use datatables without ScrollY, Everything worked without any errors. When I removed paging and added ScrollY, then I got errors in other pages too
Can you use http://live.datatables.net or JSFiddle to give us a test case so we can debug it please?
Allan