1

I am using DataTable to display table in Lightning Component. Locker Service is enabled for developer sandbox. When I apply Component version as 40.0, the data table does not generate its UI. Whereas , when I use the version below 40.0 it works without any issues.

Referring to LockerService and Lightning Container Component: Securely Using Third-Party Libraries in Lightning Components, says that DataTables are supported in Locker Service enabled orgs.

Is any one faced similar kind of issue before?

  • What issue are you facing? Did you check browser console to see if there are any issues? – RedDevil Jul 13 '17 at 7:35
  • Hello Devendra, which versions of JQuery and DataTable are you using? I can take a look (also some quick repro steps would help). – JF Paradis Jul 13 '17 at 16:00
  • 1
    Hi @JF, I am using following versions - jQuery : v1.12.4 DataTables 1.10.9 Responsive 1.0.7. Which are the compatible versions that I need to include ? – Devendra Jul 13 '17 at 16:44
  • @RedDevil, I am getting folowing error when I apply version 40 for a lightning component - "TypeError: div.attributes[eventName] is undefined throws" – Devendra Jul 13 '17 at 16:48
  • 1
    We've not been able to have jQuery V1 working properly, and we are recommending your use V2 or V3. In particular, I know jQuery v2.2.4 has been very stable for most. Give it a shot, post your results, and we will take it from there! – JF Paradis Jul 13 '17 at 21:18
1

Referring to LockerService and Lightning Container Component: Securely Using Third-Party Libraries in Lightning Components, says that DataTables are supported in Locker Service enabled orgs.

No, it does not say that DataTables is supported, it specificaly mentions that:

Version 1.10.12

of DataTables is supported. Always check the library versions you are using when referring to this documentation.

If your library is not listed and testing the library in a component using API v40+ doesn't work, then it is most likely not supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.