how can stop navigation on the first row and on the last row of row selection from up and down keys?

how can stop navigation on the first row and on the last row of row selection from up and down keys?

immortalhemrajimmortalhemraj Posts: 3Questions: 2Answers: 0
edited January 2019 in Free community support
  if (e.keyCode == 40){ //arrow down
              
             table.$('tr.selected').removeClass('selected');
            tr.next().addClass('selected');
            tr = table.$('tr.selected');
              
            }
            if (e.keyCode == 38){ //arrow up
              
             table.$('tr.selected').removeClass('selected');
               tr.prev().addClass('selected');
               tr = table.$('tr.selected');
            
            }
            data = table.row('tr.selected').data();

Answers

This discussion has been closed.