ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: youngvan on August 29, 2019, 09:20:35 pm
-
Hi!
Any updated on this issue https://github.com/paramquery/grid/issues/163 ?
P.S. This problem is not produced on iOS devices, only android
-
I don't see the mentioned issue in Pro version.
-
We use ParamQuery Pro v6.0.0, so probably it's depends on version.
Was it fixed after 6.0 version or before?
-
ping
-
This works fine in v6.0.0 too
http://jsfiddle.net/a1nepgvx/1/show
No such issue has been reported in Pro as per my knowledge.
-
I found the issue, it is due to a Chrome bug (https://bugs.chromium.org/p/chromium/issues/detail?id=1466893#c_ts1689983830)
The issue is that pqGrid, when there is a refresh or refreshView, pqGrid recreates its contents, so instead of just refreshing the grid and not the header, it does both. This means that the selected filter gets destroyed (so it rightfully loses focus) then recreated. We need a refreshGrid that doesn't refresh the header rows, which would fix this.
However, I did create a fix
// Get the name of the focused filter
var focus = $(grid).find("input.pq-search-txt:focus),
focused_name= focus.attr("name");
// Do any grid refresh
$(grid).pqGrid("refresh");
// Now find the newly created filter input and select it
if(focused_name) $(grid).find("input.pq-search-txt[name="+focused_name+"]").focus();