KeyTable sort of working, but not allowing editing of cells directly

KeyTable sort of working, but not allowing editing of cells directly

bfarkasbfarkas Posts: 181Questions: 48Answers: 0

I know I must be missing something very basic, but have tried ll sorts of things and cannot figure out what is wrong. I am trying to get this table to full excel like functionality and so want keys to be able to edit. I think I set it up correctly, have tried all the settings and tried the examples and it just does not work, all the other features work, but it won't let me edit the cells inline.
Here is a current example:
https://newyorklife.acms.com/plnr3zzewp46/
Thanks in advance!

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    It looks like your KeyTable is being initialised like this:

        "keys": {
            "columns": ":not(:first-child)",
            "editOnFocus": true
        },
    

    You need to define the Editor instance as part of that declaration.

    Take a look at this example here and see if that helps - that's showing how to setup both Editor and DataTables.

    Colin

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    Thanks Colin, I'm confused where you got that, in the JS file that defines the table:
    https://newyorklife.acms.com/plnr3zzewp46/default/js/table.mainTB.js

    I have it set: editor: p200Table

    Is it somehow not translating into the creation?

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    No, I don't think it is. I loaded the table into the debugger, and what I reported above was showing in the initialisation options. Is it possible the table is being initialised from another source?

    Colin

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    I don't see how, it is the only configuration set for the table and the only table in the setup currently. I was running the debugger, but it was not reporting anything back that was useful, not sure how you were loading it to see those details, I have only run through the menu choices and the only error found is a warning for android and fixed header, unrelated...the link from above:
    https://newyorklife.acms.com/plnr3zzewp46/default/js/table.mainTB.js

    Is the configuration file which definitely has it defined. Really at a loss here.

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    I just tried to essentially recreate the version from the example area and ran into the same issue. Is it possibly due to being all front end?

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    editor: p200Table

    In both your autoFill and keys objects. p200Table is the DataTable instance, not the Editor instance. Try editor: editor and it should work.

    Allan

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    That's how I originally had it, and then switched it to p200Table and got some functionality. When I switch it to editor I get this error each time I click to try and invoke the edit of keys:
    Uncaught TypeError: this.node is not a function
    at v.<anonymous> (datatables.min.js:424)
    at v.iterator (datatables.min.js:137)
    at v.<anonymous> (datatables.min.js:423)
    at v.<anonymous> (datatables.min.js:141)
    at v.fixedNode (datatables.min.js:140)
    at v.<anonymous> (dataTables.editor.min.js:109)
    at v.each (datatables.min.js:136)
    at m (dataTables.editor.min.js:108)
    at f.individual (dataTables.editor.min.js:110)
    at f._dataSource (dataTables.editor.min.js:82)

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794
    edited February 2020 Answer ✓

    See if this thread, with the same error Uncaught TypeError: this.node is not a function helps.

    Kevin

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    Thanks Kevin, this didn't exactly answer but put me on the right path. I had to remove the header and column add-ins which let keys full work.

This discussion has been closed.