edit cell validator Maximum call stack size exceeded
See original GitHub issueTo Reproduce The price does not allow less than 0, click Edit Price if you enter the <0 number, then click on the other cells to edit the error “Maximum Call stack size exceeded.”
// I use Chrome devtools to debug display errors out now tabulator.js row:13276
Edit.prototype.focusCellNoEvent = function (cell) {
this.recursionBlock = true;
if (this.table.browser !== "ie") {
cell.getElement().focus();
}
this.recursionBlock = false;
};
In addition, can you provide version 4.2 of the API documentation to GitHub, easy to use offline viewing
Sorry, my English is very poor, I hope I have expressed my problem
Describe the bug Uncaught RangeError: Maximum call stack size exceeded. at Edit.focusCellNoEvent (tabulator.js:13276) at success (tabulator.js:13323) at onChange (tabulator.js:13594) at HTMLInputElement.<anonymous> (tabulator.js:13582) at Edit.focusCellNoEvent (tabulator.js:13276) at success (tabulator.js:13323) at onChange (tabulator.js:13594) at HTMLInputElement.<anonymous> (tabulator.js:13582) at Edit.focusCellNoEvent (tabulator.js:13276) at success (tabulator.js:13323) Edit.focusCellNoEvent @ tabulator.js:13276 success @ tabulator.js:13323 onChange @ tabulator.js:13594 (anonymous) @ tabulator.js:13582 Edit.focusCellNoEvent @ tabulator.js:13276 success @ tabulator.js:13323 onChange @ tabulator.js:13594 (anonymous) @ tabulator.js:13582
Tabulator Info Tabulator 4.2.3
Working Example
var table = new Tabulator("#example-table", {
layout: "fitColumns", //fit columns to width of table (optional)
columns: [ //Define Table Columns
{
title: "price", field: "price", editor: "number", validator: {
type: "min",
parameters: 0,
},
},
{
title: "Number", field: "number", editor: 'number', validator: "numeric",
},
],
});
Desktop (please complete the following information):
- OS: windows 7
- Browser Google Chrome 72.0.3626.121
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
there was an issue with the number editor that caused multiple event bindings to be created on validation fail which cascaded and used the whole call stack.
I have pushed a fix for this to the master branch and will include it in today’s patch release
Cheers
Oli 😃
@olifolkerd I figured out my problem it had to do with the data I was passing to the
data
element. I was passing a directmodel
from the database instead of passing anobject
. Now I can edit my elements properly. Thanks