Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !37584

Call dispose on component reinstantiation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/alpadev/alpadev/call-dispose-on-component-reinstantiation into main Dec 05, 2022
  • Overview 1
  • Commits 2
  • Pipelines 1
  • Changes 12

Created by: alpadev

Description

Call dispose() automatically when a component is initialized on an element that has already another component (of the same type) stored in the registry.

Note: Looks like there is an issue with this approach. At the moment this change seem to cause tests to be flaky at times. I ran them several times with some randomly failing and sometimes not.

Motivation & Context

It solves the problem of components being (re)initialized multiple times, without calling dispose() manually on the existing instance.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

  • https://deploy-preview-37584--twbs-bootstrap.netlify.app/

Related issues

rel: #37442

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/alpadev/alpadev/call-dispose-on-component-reinstantiation