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

fix(hgrid): Expose onGridInitialized output #6860 #7482

Merged
merged 8 commits into from
Jun 8, 2020
Merged

Conversation

dkamburov
Copy link
Contributor

@dkamburov dkamburov commented Jun 4, 2020

Closes #6860

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 (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • 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 (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@MayaKirova MayaKirova added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Jun 4, 2020
@MayaKirova
Copy link
Contributor

@dkamburov
It seems that the additional change detection fully initializes the child grid before triggering the onGridCreated event so now if you try to subscribe to an initialization event like the onColumnInit:
event.grid.onColumnInit.subscribe(x => console.log('emitted'));
It will never fire.

@MayaKirova
Copy link
Contributor

@dkamburov You could force the child grid to register in its API service instead of calling detect changes, for example:

    this.hGrid._setupServices();
    this.layout.onGridCreated.emit({
        owner: this.layout,
        parentID: this.rowData.rowID,
        grid: this.hGrid
    });

This should ensure the grid registered before the event is emitted.

@MayaKirova MayaKirova added 🛠️ status: in-development Issues and PRs with active development on them and removed 💥 status: in-test PRs currently being tested labels Jun 4, 2020
@dkamburov dkamburov requested a review from MayaKirova June 5, 2020 07:37
@dkamburov dkamburov changed the title fix(hgrid): Explicitly invoke detectChanges for the root grid #6860 fix(hgrid): Expose onGridInitialized output #6860 Jun 5, 2020
@MayaKirova MayaKirova added 💥 status: in-test PRs currently being tested ✅ status: verified Applies to PRs that have passed manual verification and removed 🛠️ status: in-development Issues and PRs with active development on them 💥 status: in-test PRs currently being tested labels Jun 5, 2020
@kdinev kdinev merged commit 6299662 into 9.1.x Jun 8, 2020
@kdinev kdinev deleted the dkamburov/fix-6860 branch June 8, 2020 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid: hierarchical-grid version: 9.1.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants