Uncaught TypeError: this.context[0]._searchBuilder is undefined datatables
Uncaught TypeError: this.context[0]._searchBuilder is undefined datatables
worgor
Posts: 17Questions: 4Answers: 0
Link to test case:
Error messages shown: Uncaught TypeError: this.context[0]._searchBuilder is undefined datatables
Description of problem:
I just bought the new Editor 2.0.1 Bundle and replaced the Editor 1.9.6 Bundle - when i now use the exact code
var editor = new $.fn.dataTable.Editor( {
table: "#headerparameter",
idSrc: "id",
fields: [ {
name: "name",
type: "text"
}, {
name: "value",
type: "text"
}, {
label: "type",
name: "type",
type: "select",
options: [
{ label: 'String', value: 'string' },
{ label: 'Number', value: 'number' },
{ label: 'Boolean', value: 'boolean' },
{ label: 'Expression', value: 'expression' }
]
}
]
}
);
$('#headerparameter').on( 'click', 'tbody td:not(:first-child) ', function (e) {
editor.inline( this, {
buttons: { label: '>', fn: function () { this.submit(); } }
} );
} );
with 1.9.6 it works - with 2.0.1 it shows the above error when submitting the content.
Do i have to inlcude something additionally? The Package Searchbuilder is included also.
This discussion has been closed.
Answers
Sounds like the same issue as discussed in this thread although you have a different error.
Are you using searchBuilder? If not then the workaround is to remove searchbuilder from the list of included JS files or use the nightly code.
Kevin
Thanks for the Comment, i tried to remove Searchbuilder but the same with and without the import - strange - switching back an forth is only showing that with 1.9.6 it works regardless of imports, with 2.0.1 this error occurs everytime where there is a commit button inside the cell or at the end of the line - i tried actually to use this example https://editor.datatables.net/examples/inline-editing/fullRowCreate.html without success - even with the original imports and code.
Definitely something odd going on there. Are you able to link to your page so we can take a look?
Colin
Hi Colin, i'll try to give you access to the page! Thanks for your support!