Custom field type can't be reganized

Custom field type can't be reganized

nylltznylltz Posts: 5Questions: 2Answers: 1
edited August 2015 in Plug-ins

Hi all.

I try to make a customized form in Editor by clicking a button "Trend". Generally I was following the Datatable Editor manual. However Chrome gives exception like "Uncaught TypeError: Cannot read property 'create' of undefined".

By debugging I found the Editor object don't know my own type at all, though the type declaration indeed has got executed already.

I shared my code in DataTables Live: http://live.datatables.net/zolijaci/1/edit?html,css,js

I appreciate any suggestions you guys made to me.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Hi,

    Possibly you might be using Editor 1.4? If so, replace:

    var _fieldTypes = DataTable.ext.editorFields;

    with:

    var _fieldTypes = Editor ?
        Editor.fieldTypes :
        DataTable.ext.editorFields;
    

    Attaching to the DataTable.ext object is a feature of Editor 1.5. i'm going to update the plug-ins presented on the Editor site to include the above.

    Allan

  • nylltznylltz Posts: 5Questions: 2Answers: 1

    Thank you Allan. I upgrade to v1.5 and now it is all okay.

This discussion has been closed.