Hello,
I’m getting the following errors when the mouse cursor moves over a datatable with dynamic loading enabled (This is v7.4.2). I’m sorry but I do not know how to debug this to provide you more useful information.
datastore.js:569 Uncaught TypeError: 1596718552656 is not a function
at Array.find (<anonymous>)
at ve.getIndexById (datastore.js:569)
at u.getIndexById (datastore.js:773)
at u.tS (areaselect.js:215)
at u.render (areaselect.js:215)
at u.<anonymous> (areaselect.js:215)
at ve.<anonymous> (helpers.js:97)
at ve.callEvent (eventsystem.js:56)
at ve.refresh (datastore.js:216)
at ve.removeMark (datastore.js:824)
I think it may relate to the tooltips on the table as if i set the parameter tooltip:false I no longer receive the errors. Let me know if / how i can provide more helpful information
-SrvrSide
1 Like
@SrvrSide
I resolved above issue with this patch
(function(arrayFind){
if(!arrayFind){
return;//polyfill is required
}
Array.prototype.find = function (p) {
if (typeof p != 'function') {
arguments[0] = function (obj) {
return obj == p
}
}
return arrayFind.apply(this, arguments)
}
}(Array.prototype.find));
probably something related to removed webix.PowerArray
Hi @SrvrSide and @intregal
Could you please provide more details on your implementation?
This error seems quite strange: truly, the getItemById uses a custom find method, but it should not conflict with native Array API.
I would be glad if you can help us to find the exact conditions for this issue.
The following example (tooltip enabled) and separate calls for getIndexById reveal no problem, unfortunately: https://snippet.webix.com/ixxn2zgt
The datathrottle here is set to 1000ms to imitate slow data loading and get a chance to move the cursor over the empty rows.
Thanks!
Hi @Listopad
my implementation is exactly the same as in my prev post.
it is hard to repeat the error but I am sure that code like this will lead to error
datastore.js line 146
this.order = this.order.slice(0, endpos)
in this case order.find will be plain Array.find not PowerArray.find
hello @Listopad, I’m sorry as I could not overcome the issue reliably I took another approach, I needed stable operation so couldn’t afford to chase it. I will try and reimplement the dynamic loading in a test harness over the next few days to see if I can produce the same error.
-SrvrSide