ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Tutorial "306_expandable_grid" description is incompatible with the latest unstable version (v3.0.0-rc.12-bb0ac1b)

Open Kiougar opened this issue 12 years ago • 11 comments

Replace the first part of the description:

$scope.gridOptions.expandable = {
  //This is the template that will be used to render subgrid.
  rowExpandableTemplate: 'rowExpandableTemplate.html',
  //This will be the height of the subgrid
  expandableRowHeight: 140
}

With this:

$scope.gridOptions = {
  //This is the template that will be used to render subgrid.
  expandableRowTemplate: 'expandableRowTemplate.html',
  //This will be the height of the subgrid
  expandableRowHeight: 140
}

The example code is correct.

Kiougar avatar Oct 28 '14 17:10 Kiougar

Upon expanding; all data below the expanded line is 'off'. It looks like the successive records Id gets pulled to the last column of the previous record. picture1

kevinsoltis41 avatar Oct 28 '14 18:10 kevinsoltis41

Hmm. That looks like our rounding error on column widths. But I don't see why expandable would cause that to happen below the break. @jpuri, is this in your space?

PaulL1 avatar Oct 28 '14 18:10 PaulL1

@kevinsoltis41, @PaulL1 I found a w/a: Provide the width property in the last or the one before last column in the column definitions. http://plnkr.co/edit/9j7d8o38A1iu1uoMGed1?p=preview

Kiougar avatar Oct 28 '14 19:10 Kiougar

Hey @kevinsoltis41 ,

I tired expand all even with the width property removed and its working corectly. Check this: http://plnkr.co/edit/D2MISQ32N855jeevSgHZ?p=preview

jpuri avatar Oct 30 '14 11:10 jpuri

@jpuri they updated the http://ui-grid.info/release/ui-grid-unstable.js file. It's fixed now I believe.

Kiougar avatar Oct 30 '14 11:10 Kiougar

@PaulL1, I guess we can close this issue.

jpuri avatar Oct 30 '14 18:10 jpuri

OK, thanks.

PaulL1 avatar Oct 30 '14 19:10 PaulL1

@PaulL1, don't close it yet since the title of this issue is not yet resolved. Or, should I rename this title and create a new issue for Tutorial 306?

Kiougar avatar Oct 30 '14 21:10 Kiougar

This is still an issue. If you have many columns and set minWidth in the columnDef such that you have to scroll horizontally within the grid to view all of your row data, expanding a row will still make everything below it "off" as @kevinsoltis41 described.

longshot5112 avatar Dec 16 '14 17:12 longshot5112

@longshot5112 , Please share a fiddle or plunkr for it.

jpuri avatar Dec 17 '14 04:12 jpuri

http://plnkr.co/edit/lqYawJkHY7TvChmQdFb4?p=preview

It seems to be affected somewhat by the number/width of columns and your browser window width.

longshot5112 avatar Dec 17 '14 16:12 longshot5112