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

Cell in edit mode is not correct when expand a row #4761

Closed
nrobakova opened this issue May 13, 2019 · 2 comments

Comments

@nrobakova
Copy link
Contributor

commented May 13, 2019

Description

Row editing buttons are not in correct position when expand a row in a child grid

  • igniteui-angular version: 7.3
  • browser: n/a

Steps to reproduce

  1. Open dev sample hierarchicalGridUpdating
  2. Expand first row
  3. In the child grid double click on a cell in row with id 3
  4. Row edit template is opened
  5. In the child grid expand row with id 1
  6. Scroll to row 3

Note1: Same is valid for the root grid
Note2: same is valid for cell editing

Result

Cell in row 2 is in edit mode and Done/Cancel buttons are under row 3

Expected result

Cell in edit mode should be in row 3

Attachments

image

@wnvko

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

The issue is a result of how HierarchicalRow determines if the cell is in edit mode:
[editMode]="col.editable && crudService.isInEditMode(index, col.index)"
The cell is using index which is row index. When a row expands the row indexes of cells are changed.

@wnvko wnvko assigned mpavlinov and unassigned Lipata and wnvko Jul 22, 2019

@MayaKirova

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

@wnvko The same applies to normal grid row and treegrid row. They all use the isInEditMode function, which currently reads the row index. I assumed you were going to change the isInEditMode function to also use the rowID, not the row index as it represents the index in the rows collection, which changes when the rows or their order is changed. Let me know if that would be a viable fix or if we should discuss other possible approaches.

@wnvko wnvko self-assigned this Jul 22, 2019

wnvko added a commit that referenced this issue Jul 23, 2019

@wnvko wnvko referenced this issue Jul 23, 2019
3 of 14 tasks complete

wnvko added a commit that referenced this issue Jul 23, 2019

wnvko added a commit that referenced this issue Jul 23, 2019

test(grid): exit edit mode on collapse/expand, #4761
# Conflicts:
#	projects/igniteui-angular/src/lib/grids/grid/grid.component.spec.ts

wnvko added a commit that referenced this issue Jul 23, 2019

wnvko added a commit that referenced this issue Jul 23, 2019

@wnvko wnvko referenced this issue Jul 23, 2019
3 of 14 tasks complete

wnvko added a commit that referenced this issue Jul 23, 2019

wnvko added a commit that referenced this issue Jul 23, 2019

@kdinev kdinev closed this in #5542 Aug 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.