How use fix error : Cannot read properties of undefined (reading 'Editor')

How use fix error : Cannot read properties of undefined (reading 'Editor')

Az0xAz0x Posts: 3Questions: 1Answers: 0
edited May 2022 in Free community support

I use datable with Vue3 and i want use Editor for external variable, but i have an error :

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'Editor')
    at Proxy.mounted (Table.vue:40:5)
    at callWithErrorHandling (runtime-core.esm-bundler.js:155:22)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:164:21)
    at Array.hook.__weh.hook.__weh (runtime-core.esm-bundler.js:2667:29)
    at flushPostFlushCbs (runtime-core.esm-bundler.js:356:32)
    at flushJobs (runtime-core.esm-bundler.js:401:9)

I have import

import $ from "jquery";
import "datatables.net";
import "datatables.net-editor-dt";
import "datatables.net-editor";

the error throw with :

var editor = new $.fn.dataTable.Editor({
      ajax: "php/users.php",
      table: "#users",
      fields: [
        { label: "First name:", name: "first_name" },
        { label: "Last name:", name: "last_name" },
        { label: "Approved:", name: "approved" },
      ],
    });

This question has an accepted answers - jump to answer

Answers

  • Az0xAz0x Posts: 3Questions: 1Answers: 0
    edited May 2022

    delete comment

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Answer ✓

    Happy to take a look at a test case showing the error.

    Allan

  • Az0xAz0x Posts: 3Questions: 1Answers: 0

    I have resolve my solution, but thank you.

Sign In or Register to comment.