Uncaught Type error when trying to create a dropdown
Uncaught Type error when trying to create a dropdown
steven.stenzel
Posts: 9Questions: 3Answers: 0
I have managed to get the editor working with sever tables and joins, and I thought I would try to implement the dropdown option for some user friendliness, and how I am getting
Uncaught TypeError: Cannot use 'in' operator to search for '9' in json.users jquery.js:2
r jquery.js:2
m.extend.each jquery.js:2
labelValPair dataTables.editor.js:5121
fieldTypes.select.$.extend._addOptions dataTables.editor.js:5200
fieldTypes.select.$.extend.update dataTables.editor.js:5220
Editor.Field._typeFn dataTables.editor.js:422
that.(anonymous function) dataTables.editor.js:218
$.DataTable.initComplete datatest:60
(anonymous function) jquery.dataTables.js:5096
m.extend.map jquery.js:2
_fnCallbackFire jquery.dataTables.js:5095
_fnInitComplete jquery.dataTables.js:3248
(anonymous function) jquery.dataTables.js:3220
_fnBuildAjax.baseAjax.success jquery.dataTables.js:2380
j jquery.js:2
k.fireWith jquery.js:2
x jquery.js:4
b jquery.js:4
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Here is the php, i am currently calling it through laravel routing, and dynamically generating the columns from an array, to allow me to edit it quickly. This works fine with join tables and double join tables, but I'm getting the error with dropdowns.
Hi,
The thing that immediately stands out is:
You are passing in a string - not the value of
json.users
. Remove the quotes and, hopefully it will start working.Allan
Perfect Allan, didn't immediately jump out yesterday, but i'm sure it will become obvious when I get used to your library. ;)