Skip to content
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

Row Selection does not work correctly in Gridx on double click #440

Open
tansihede opened this issue Aug 3, 2021 · 2 comments
Open

Row Selection does not work correctly in Gridx on double click #440

tansihede opened this issue Aug 3, 2021 · 2 comments

Comments

@tansihede
Copy link

tansihede commented Aug 3, 2021

Hi Team,

We are using Gridx in one of our application and are facing below issue during row selection in Grid

Steps to reproduce issue-

  1. Select the first row in the grid by mouse double click and change the value from dropdown which is bound to one of the column in the grid.
  2. Next select the second row in the grid by mouse double click
  3. This time the mouse pointer will skip the second row and jump to the third row instead of jumping on the second row.

Expected Behavior: Mouse pointer should jump correctly on the selected row which in above case should be the second row.

Could anyone help if this is known issue of Gridx code. Is there any way or code fix or any alternate solution by which we can solve the issue?

Issue Reproducible on

  • OS : Windows 10
  • Gridx Version: 1.3.8
  • Chrome Version: 92.0.4515.107

I suspect the issue is coming from _onSelectionChange() function from gridx/modules/extendedSelect/_Base.js file which calls getSelected() function from gridx/modules/extendedSelect/Row.js to get the selected rows that returns two selectedIds instead of returning the single Id thus affecting the selection.

Any kind of input pointers/suggestions would be highly appreciated.

Thanks,
Tansi

@RobertKDavis
Copy link

I think there is more going on than just Gridx. Does this happen on any row or only the first?
I do not understand the drop down and how it interacts with your grid and what does the dropdown "onChange" do?
Double Click? Isn't single click select?

You will want to look at the dropdown onChange and how you have rowDblClick and rowClick defined on the grid.
gridx.on("rowDblClick", function(e){ console.log("rowDblClick Fired"); ...
gridx.on("rowClick", function(e){ console.log("rowClick Fired"); ...

My guess: the onChange does something and then selects the next row. This next selection happens after you already selected a different row and so your next row is 1 more.

@tansihede
Copy link
Author

Thanks Robert for quick response !

Yes, the issue happens for other rows as well not only specific to first row. We have a Dropdown which is basically a cell widget bound to one of the column in gridx. To enable this cell editing we need to double click on the grid row.

Thanks,
Tansi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants