Bug Editor 1.5.1 + Standalone
Bug Editor 1.5.1 + Standalone
Using Editor 1.5.1 and dataTable1.10.9 in standalone mode,(no table option), I've got this error when I try to set the value of a select field
Uncaught TypeError: Cannot read property 'length' of undefined
Editor.Field._multiValueCheck @ dataTables.editor.js:531
Editor.Field.set @ dataTables.editor.js:424
Editor.Field.val @ dataTables.editor.js:448
The error happens, when variable 'ids' is undefined line l.530 :
for ( var i=0 ; i<ids.length ; i++ ) {
I manage to solve the issue wrapping the entire function in an if(typeof ids != 'undefined')
statement but not sur it's safe for the rest.
Replies
Hi,
Are you able to give me a link to a test page showing the issue please?
This example shows a select field being used inline with a standalone editor without error.
Allan
Hi,
I manage to solve the problem.
I'm trying to develop an extension in order to be able to use editor in standalone mode to edit a given entry of a table but without the table (with inline editing).
The purpose is to use the same php process page to update individual row on specific pages.
I was tring to set the values of all fields without specifiing the row that I was editing.
editor.field(fieldName).val(value);
adding this line before solved my issue:
editor.edit( rowID ,false ).close();
Thanks for your answer