new $.fn.dataTable.Editor - error

new $.fn.dataTable.Editor - error

jklassjklass Posts: 1Questions: 1Answers: 0

Error: Property 'Editor' does not exist on type 'StaticFunctions'.ts(2339)

I am creating a SharePoint web application and keep getting this error. datatables.net-editor is in my node packages and I have tried accessing it with: import "datatables.net-editor" and require("datatables.net-editor")

Answers

  • allanallan Posts: 63,212Questions: 1Answers: 10,415 Site admin

    Sounds like you might be using TypeScript? I'm afraid we don't currently have TypeScript bindings for Editor, so you'd need to use:

    let editor = new ($.fn.DataTable as any).Editor({
      ...
    });
    

    Regards,
    Allan

This discussion has been closed.