Focus on DataTable input field programatically
I'm submitting a ... (check one with "x")
[ ] bug report => Search github for a similar issue or PR before submitting
[X] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110
Hi!
My team and I have been working for quiet some time on how to programatically focus on an input field / cell in a data table.
In our application there are several use cases where we would need an API that would allow us to "simply" focus on a cell (or input in a cell if present) like this:
dataTable.focusXY(1, 3) // Focuses on the second row and the fourth column
dataTable.focus(1, "MyColumn") // Focuses on the second row and the column identified by "MyColumn"
Right now we are working an a monkey patch based on plain HTML handling but that sure doesn't feel production ready.
Is there such a feature that I may be missing?
There is no such feature, if there is more demand on this we'll add it for sure.
Thank you for your response! Our current solution is to use the ref mechanic of Vue upon mounting the component to manually create a data structure that allows for a quick access to the related input html elements of each cell.
Do you have an example of your current solution, i'm interested on this feature
This would be a nice feature...
Issue tracker is used for defects only as part of our commitment to quality and continuous improvement in all areas. Enhancements are collected as valuable community feedback and managed internally so moving this enhancement ticket to our internal project management backlog.