BootstrapTable: get the data-index by the row obtained by the getSelections method

0

I have a table in my project where I use the BoostrapTable plugin, which has a column with radio button enabled (date -radio="true").

To retrieve the data from the record marked in the table via javascript I use the $(tabela).bootstrapTable('getSelections') method and get the "row" selected.

However, how do I get the value of the data-index attribute (generated by the plugin itself)?

(I need the data-index so that at another time I can dial the radiobutton again)

    
asked by anonymous 09.05.2018 / 18:25

1 answer

1

I was able to go directly through the DOM using jQuery, without using a plugin method, to retrieve the index of the line:

$ (input table [name = 'btSelectItem']: checked "). attr (" data-index ")

    
10.05.2018 / 13:19