Inline editor, highlight/select value when tabbing to field

Inline editor, highlight/select value when tabbing to field

capeckcapeck Posts: 54Questions: 13Answers: 1

I am using inline editor and keyTable. When tabbing to a new column, I want to highlight (select) the value. The default action is putting the cursor at the end of the value, as in your inline editor tab between columns example. Thanks .

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,569Questions: 1Answers: 10,481 Site admin
    Answer ✓

    I've been back on forth on this one a little bit - it seems some people like it, some don't. I had actually thought there was an option for it, but I'm not seeing it, however it can be done with a couple of lines of Javascript:

      editor.on('open', function () {
        $('#example div.DTE input').select();
      });
    

    Example: http://live.datatables.net/jorutoji/12/edit .

    Allan

  • capeckcapeck Posts: 54Questions: 13Answers: 1

    I like it! Thanks

Sign In or Register to comment.