Datatables as input - language

Datatables as input - language

rozrorozro Posts: 1Questions: 1Answers: 0

Hi, i'm using the new Editor 2.0 with Datatable as Input feature.

It works well, i got everything working.
Right now there are 1 DataTables instance declared and 2 Editors.

I'd like to apply the same localization (used in the main Datatable) to the "nested" Datatable.

As i read in the docs, the "config" section in the main Editor is the place to apply Datatable option.

Doing that it results in a jquery error "Cannot read property 'style' of undefined".

Any suggestion?

Answers

  • rf1234rf1234 Posts: 2,801Questions: 85Answers: 406

    You probably need to use an event to make sure the Editor exists when you apply the styling.
    This one could help:
    https://editor.datatables.net/reference/event/open

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Unfortunately this is a bug. The language.url option makes the DataTables initialisation async, which Editor is not currently handling. I've got it fixed in our git repo and we'll push a release with it next week.

    One thing though - we weren't getting the Cannot read property 'style' of undefined error. That is almost always due to a mismatch in the columns. The error we were seeing was that the DataTable simply didn't display. Which version of Editor 2.0.x are you using?

    Allan

Sign In or Register to comment.