Skip to content

IgxGrid disabled row implementation. #7104

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

Merged
merged 30 commits into from
Apr 15, 2020
Merged

Conversation

skrustev
Copy link
Member

@skrustev skrustev commented Apr 10, 2020

Closes: #6926
#6640

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code
  • This PR includes API docs for newly added methods/properties
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes
  • This PR includes behavioral changes and the feature specification has been updated with them

Integration scenarios with ghost rows:

  • Updating
  • Hiding
  • Filtering
  • Sorting
  • Summaries
  • Master-Details view
  • Multi-row layout
  • State persistence directive
  • Group by (with/without group summary).
  • Export to excel - test with this: Revert "Row pinning + export to excel" #7069
  • Row Selection
  • Cell Selection
  • Paging

These should be tested.

@skrustev skrustev changed the title Disabled row initial commit. IgxGrid disabled row implementation. Apr 10, 2020
@MayaKirova MayaKirova marked this pull request as ready for review April 13, 2020 16:00
@ChronosSF ChronosSF changed the base branch from skrastev/hgrid-row-pinning to master April 13, 2020 17:00
MayaKirova
MayaKirova previously approved these changes Apr 15, 2020
Copy link
Contributor

@MayaKirova MayaKirova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just noted a few potential improvements.

@@ -5137,7 +5156,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
* ```
*/
get dataView(): any[] {
return this.verticalScrollContainer.igxForOf;
return this.verticalScrollContainer.igxForOf.map(rec => this.isGhostRecord(rec) ? rec.recordRef : rec) ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this mapping still necessary? We don't extract the original data from meta data records for other features (like group records, hierarchical records etc.) so unless there is some specific integration scenario that depends on the value to be extracted this is probably not needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally I suspect this getter is called quite a lot around the grid code/templates. With a sufficiently big data, this is basically creating and discarding a new array on each call.

@@ -89,10 +89,14 @@ export class IgxGridHierarchicalRowPinning implements PipeTransform {

constructor(private gridAPI: GridBaseAPIService<IgxHierarchicalGridComponent>) { }

public transform(collection: any[], pinnedArea: boolean, pipeTrigger: number): any[] {
public transform(collection: any[], isPinned: boolean, pipeTrigger: number): any[] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As base grid pinning pipe and the one for the hierarchical grid are the same, we can remove the one for hierarchical grid pinning and re-use the base grid one.

@ChronosSF ChronosSF mentioned this pull request Apr 15, 2020
10 tasks
@mddragnev mddragnev self-assigned this Apr 15, 2020
MayaKirova
MayaKirova previously approved these changes Apr 15, 2020
Copy link
Contributor

@MayaKirova MayaKirova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@MayaKirova MayaKirova self-requested a review April 15, 2020 17:15
MayaKirova
MayaKirova previously approved these changes Apr 15, 2020
@ChronosSF ChronosSF merged commit 1241860 into master Apr 15, 2020
@ChronosSF ChronosSF deleted the SKrastev/grid-disabled-pin-row branch April 15, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Shadow Row Disable when Pinning
6 participants