Inline editor, highlight/select value when tabbing to field

Inline editor, highlight/select value when tabbing to field

capeckcapeck Posts: 49Questions: 12Answers: 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: 61,446Questions: 1Answers: 10,054 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: 49Questions: 12Answers: 1

    I like it! Thanks

Sign In or Register to comment.