Buttons Text chnages when i call fnFilter
Buttons Text chnages when i call fnFilter
Hi,
I have a table and i have added buttons
[code]$("").prependTo($('.dataTables_filter'));[/code]
and at certain point i apply filter on the table like this
[code]viewATPDataTable.fnFilter("ABC");[/code]
When this filter is applied, My button text(label) changes to "ABC" from delete.
Any help is appreciated.
I have a table and i have added buttons
[code]$("").prependTo($('.dataTables_filter'));[/code]
and at certain point i apply filter on the table like this
[code]viewATPDataTable.fnFilter("ABC");[/code]
When this filter is applied, My button text(label) changes to "ABC" from delete.
Any help is appreciated.
This discussion has been closed.
Replies
[code]viewATPDataTable.fnFilter("ABC");
$('#deleteAgileProgButton').val("Delete");[/code]
But is this the correct way.
Any other better suggestions?
This was a bit of a bug in DataTables - the way I was updating the text input with your filtering string was with the selector $('input', ctx) - hence it matched your additional button as well. I've just committed a change which makes the selector DataTables uses more selective and will only update the correct element. This will be included in 1.9.1 and is available now as the 1.9.1.dev nightly on the download page.
Allan
I tried using the nightly script.
http://datatables.net/download/build/jquery.dataTables.nightly.js
But tht didnt seem to work
Allan
I guess i took the changes before you committed it
It did work now.