fooplugins / FooTable

jQuery plugin to make HTML tables responsive
https://fooplugins.com/plugins/footable-jquery/
Other
2.13k stars 637 forks source link

removeClass not working for extended row #824

Open NashBridgesAT opened 6 years ago

NashBridgesAT commented 6 years ago

Hi I use footable for a mail inbox. Therefore I load the rows via AJAX and mark unread mails as bold (using an own css) on server side. On expanding the row i want to remove the css-class, so i use


.on({'expand.ft.row': function(e, ft, row){
                    row.$el.removeClass('text-bold');
                    //do sth on the server side (database update)                   
                    }               
                })

This works, but not for the expanded row itself! Any efforts to go down the DOM by $(row.$el).next('.footable-detail-row tr').removeClass(....) fail, because the expandend footable-detail-row does not exist yet, as the event is fired before the row is expanded.

It seems that the classes are hold somewhere in the underlying footable data or row object, but i have no idea how to access and change that...

Can you help me?

grafik

After Expansion the row is not bold except the extended column:

grafik