Simple question on how to use Select

Simple question on how to use Select

mpkhourympkhoury Posts: 5Questions: 2Answers: 0
edited January 2016 in Free community support

Hey guys,

First of all, congrats for the wonderful plugin!!! I am very excited to make it work in its full potential :D

I am having a hard time trying to put Select extension to work. I am sure I am doing a really really wrong, but I could not find what it is. In a nutshell, I have included the Select JS & CSS files on the head of the HTML, and simply passed the appropriate parameter on the initialization of the DataTable. As far as described on the manual, that would be all to make the extension available, but unfortunatelly when you click on any row, no selection happens.

I performed another test trying to capture 'select' event, also described on the documentation, but the event never happened. I am suspicious I am missing something very important.

You can see a (very simple) live preview on http://live.datatables.net/tefowene/1/edit?html,js,console,output.

Any guidance will be very welcome!

Thanks!!!

Marcelo

Answers

  • allanallan Posts: 63,276Questions: 1Answers: 10,424 Site admin
    edited January 2016

    Updated (working) test case: http://live.datatables.net/tefowene/2/edit

    The only change I made was to load Select after jQuery and DataTables.

    Allan

  • mpkhourympkhoury Posts: 5Questions: 2Answers: 0

    Hey Allan,

    Thanks very much for your fast reply. I tried to emulate the same adjustment on my project's code and to make it works I had to tweak 2 things:

    1) Load Select after jQuery and DataTables -- according to your advise
    2) Use 1.0.0 file version instead of the 1.1.0 I was using initialy

    Best!

    Marcelo

  • allanallan Posts: 63,276Questions: 1Answers: 10,424 Site admin

    Odd - I wonder why 1.1.0 wouldn't work. If you are able to give me a link to a page showing the issue with 1.1.0 that would let be debug the problem and fix any issues that might be present in the software.

    Allan

  • mpkhourympkhoury Posts: 5Questions: 2Answers: 0
    edited January 2016

    Hey Allan,

    I tried to reproduce the error on the live.datatables.net link I provided earlier, but I couldn't manage to make it. In my project I tried to once again use the CDN link instead of the local code (for 1.1.0 version) and, in fact, it didn't work.

    The server is running localy in my machine only :(

    Anyway, here is the JS manifest in Rails so you can have an ideia on what JS libraries I am relying on, and in which exact order.

    //= require jquery

    //= require jquery_ujs

    //= require bootstrap-sprockets

    //= require toastr

    //= require jquery.turbolinks

    //= require turbolinks

    //= require dataTables/jquery.dataTables

    //= require dataTables/bootstrap/3/jquery.dataTables.bootstrap

    //= require dataTables.select

    //= require dropzone

    //= require validator

    //= require bootstrap-toolkit.min.js

    //= require_tree .

    Does it help in any way?

    Cheers!!!

    Marcelo

  • allanallan Posts: 63,276Questions: 1Answers: 10,424 Site admin

    Thanks for the list. Unfortunately I don't have Rails installed so I can't test it out directly.

    Allan

  • mpkhourympkhoury Posts: 5Questions: 2Answers: 0

    I am sorry Allan. As soon as I have it deployed I may give you access so you can see the error online. Thanks!!!

This discussion has been closed.