TextField focus event and resizing a TableView
I have a Table View that has TextFields in some of the rows. When I focus on a TextField the keyboard pops up as expected. What I want to do is when the keyboard is visible to change the tableView height to reflect the amount of space left after the keyboard. This will allow users to fully scroll the tableView with the Keyboard showing.
I've tried adding an event to the focus event of the textfield and although the tableview does change size it also loses focus on the textbox:
textbox.addEventListener('focus', function(e) {
tableView.height = 200;
});
Is there a way I can rezize the tableView and maintain focus on the textbox?
If the keyboard goes away I want to add a event to put the tableView back to the full size.