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

[BUG] Components are scheduling unnecessary updates and re-renders. #2780

Closed
grosch-intl opened this issue Oct 16, 2023 · 2 comments · Fixed by #2912
Closed

[BUG] Components are scheduling unnecessary updates and re-renders. #2780

grosch-intl opened this issue Oct 16, 2023 · 2 comments · Fixed by #2912
Assignees
Labels
bug Something isn't working State: In Review
Milestone

Comments

@grosch-intl
Copy link

Describe the bug

When using the mgt-person component, I'm getting this in the console in my Angular application:

reactive-element.js:45 Element mgt-person scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update. See https://lit.dev/msg/change-in-update for more information.

I also get that for mgt-flyout.

To Reproduce
Steps to reproduce the behavior:

Just adding a mgt-person to my angular component.

Expected behavior
No warning? :)

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Framework Angular 16
  • Context @microsoft/mgt
  • Version 3.0.0
  • Provider Msal2Provider

Additional context
Add any other context about the problem here.

@grosch-intl grosch-intl added bug Something isn't working Needs: Triage 🔍 labels Oct 16, 2023
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Graph Toolkit Oct 16, 2023
@sebastienlevert sebastienlevert changed the title [BUG] [BUG] Components are scheduling unnecessary updates and re-renders. Oct 17, 2023
@sebastienlevert
Copy link
Contributor

@gavinbarron I've seen the same in similar situations. What could be creating this behavior?

@gavinbarron
Copy link
Member

Pretty sure that it's to do with the way the baseComponent changes _isLoadingState and schedules a requestUpdate('isLoadingState') during the resolution of requestStateUpdate

@sebastienlevert sebastienlevert moved this from Needs Triage 🔍 to Todo 📃 in Graph Toolkit Oct 24, 2023
@sebastienlevert sebastienlevert added this to the v4.0.0 milestone Oct 30, 2023
@gavinbarron gavinbarron linked a pull request Jan 5, 2024 that will close this issue
32 tasks
@sebastienlevert sebastienlevert moved this from Todo 📃 to In Review 💭 in Graph Toolkit Jan 5, 2024
@github-project-automation github-project-automation bot moved this from In Review 💭 to Done ✔️ in Graph Toolkit Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment