-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Changing the Focus to a Cell #2221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I had the same Problem today and also had to do a dirty hack with JQuery. |
Fix #2221 (cellNav): Add scrollToFocus method
Hi Paul / Brian, Thanks for your quick turnaround. Much Appreciated. I am yet to test this but will be doing sometime this week. Once again, many thanks !!! //Senthil |
Does anyone can manage to start editing wirh scrollToFocus method? |
I am facing a problem when I add a row programatically and I use this scrollToFocus method. When there is no vertical scrollbar then I am getting focus on last added row, and when there is a scrollbar, I am getting the scrollbar at the last row, but there is no focus. |
@feralanPaladin I was able to start editing in a hacky way by setting a custom cellClass to the cell i was aiming for, then I queried for this cell and did an element.dispatchEvent(dblClickevent) to simulate a click into the cell. |
We have a scrollto method in Angular UI-Grid which scrolls and brings the given row/col in our view if they are not in view.
What I need now is something which will give focus to the given row/col to. For example selecting the given row/col from a function. Possibly a scrollToFocus()?
I am using inline editing in the ui-grid and the focus has to go to a particular cell as per the user input in a cell and hence this need. Eg: User edit the data in A5 and the focus has to go to A6 automatically without the user manually clicking on the A6 cell.
For now, I managed to do a simple hack using JQuery to achieve this. Every cell has its own div tag in ui-grid. I just introduced an id attribute based on the [PRIMARYKEY][COLUMN_NAME]. Then used the .focus() using JQuery to achieve the task. Works perfectly as required. Having said that, if we have a scrollToFocus(), it will be nice angularly !
The text was updated successfully, but these errors were encountered: