Datatables with Vue.js?

Datatables with Vue.js?

marcgisemarcgise Posts: 2Questions: 1Answers: 0

Hi, I wonder if there exists any implementation of Datatables for Vue. Does anybody think about make an "free of jQuery" implementation?

Thanks,
Marc

Answers

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    Possibly this? I haven't used Vue myself, but that might do what you need.

    Allan

  • marcgisemarcgise Posts: 2Questions: 1Answers: 0

    I'll have a look.

    Nevertheless, I asked about an implementation of DataTables that doesn't use jQuery.

    Thanks Allan

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    Oh I see - sorry - I misunderstood.

    Currently no - there isn't a version of DataTables that doesn't work without jQuery. I did write a version a while back (1.5 beta) which worked with the Glow framework, but that was years and years ago.

    For the most pert DataTables' use of jQuery is fairly simplistic. DOM selectors and manipulation could be done by any library. The Ajax stuff likewise. The only area I think it might be difficult to port over would be the events since the namespace feature of jQuery is used.

    Allan

  • kenberkeleykenberkeley Posts: 1Questions: 0Answers: 0
  • otarmeliaotarmelia Posts: 1Questions: 0Answers: 0
    edited April 2020

    Actually, You can use jQuery with vue.js.
    It means, DataTables can be used with vue. You can achieve this, if you put datatable objects outside vue DOM.
    for example outside following div element:
    div id="app" /div

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    The way I've been doing it myself is to add the v-once attribute to the table and then initialise the DataTable as normal in a mounted life cycle event handler.

    Allan

This discussion has been closed.