Is there an on row exit function or cell().input().focus() ?

Is there an on row exit function or cell().input().focus() ?

thegamechangerprothegamechangerpro Posts: 81Questions: 30Answers: 1

Here's my issue:

I have tables that speak back to an external program. Everything is working perfectly, i am just working on making things more user friendly.

Part of the communication between the external program and the datatable is that sometimes I have to inject information back into the table. This causes my input to lose focus: ( ie then next tabbed to input)

What would be ideal is to on send my information back to the program when I leave a ROW rather than each input (on change).

Alternatively and maybe better I can just script the focusing. I can't seem to figure out how to bring focus to an input (similar to cell().focus() or cell().select() ).

I can't make a example of my use case because this isnt something I am doing IN the dataTable but rather TO the datatable.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Could you use the deselect event, that's called when the row/cell/column is deselected?

    Colin

  • thegamechangerprothegamechangerpro Posts: 81Questions: 30Answers: 1

    Hi Colin,
    Thanks for the tip. Just in case - Is there a input.()focus()?

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    For an Editor input field? Use field().input():

    editor.field('name').input().on('focus', function () {
    
    });
    

    Allan

Sign In or Register to comment.