microsoftgraph / microsoft-graph-toolkit

Authentication Providers and UI components for Microsoft Graph 🦒
https://docs.microsoft.com/graph/toolkit/overview
Other
964 stars 309 forks source link

[BUG] mgt-person fallback-details overrides person-query #2720

Closed jhholm closed 1 year ago

jhholm commented 1 year ago

Describe the bug If mgt-person has fallback-details set, person-query doesn't seem to work. Tested with 3.0.0 and 3.1.2 within SharePoint Framework with React, but bug can also be reproduced in https://mgt.dev.

To Reproduce Steps to reproduce the behavior in mgt.dev

  1. Go to https://mgt.dev/?path=/story/components-mgt-person-properties--person-fallback-details
  2. Change person-query to e.g me in elements where fallback-details are set
  3. Fallback details are still seen even though me should return Megan Bowen

Expected behavior You should not see the fallback-details when the person-query returns a valid person

Screenshots image

Environment (please complete the following information):

Additional context / bug Additionally I think updating the person-query doesn't work either. E.g if person-query comes from React state, and that state is updated, the React component rerenders, but mgt-person still shows the old person.

sebastienlevert commented 1 year ago

This absolutely seems like a bug to me. I was able to repro. This seems like a regression from v2 (you can see an example with this running with v2 here: https://stackblitz.com/edit/mgt-2720?file=index.html).

Would you be willing to submit a PR? Thanks!

jhholm commented 1 year ago

I can try if I happen to have some spare time

sebastienlevert commented 1 year ago

Let us know, we'll be happy to provide help and reviews!

MontiMarco92 commented 11 months ago

Hey guys, has this been fixed? I'm using "@microsoft/mgt-element": "^3.1.3", "@microsoft/mgt-react": "^3.1.3",

and I'm still facing this issue. If I pass fallback details, the person query does not go through.

mvmram commented 10 months ago

with the fallbackDetails the person query does not go thorough. also i use SimpleProvider for authentication. "@microsoft/mgt-element": "^3.1.3", "@microsoft/mgt-react": "^3.1.3",

mvmram commented 10 months ago

i had to downgrade the version to 2.9.0 and it works - the issue still remains in 3.1.3