Closed Ofer-Gal closed 1 year ago
I have encountered the same problem as you. +1
So! I was able to make it work and it works as expected. That being said, our documentation is a little weak and we'll do some edits over there.
You can see the repro here: https://github.com/sebastienlevert/mgt-spfx-side-by-side
The key:
mgt-spfx
for v2And only mgt-spfx-v2.sppkg deployed to the tenant I assume.
I will try that.
Thank you.
Whish I knew to use only lowercase incustomElementHelper.withDisambiguation('donereports');
Yes, only mgt-spfx-v2.sppkg is deployed! Is it breaking with disambiguation when passing non-lowercase strings? @gavinbarron, something we could maybe enforce in the function to lowercase the generated tags?
Yes. My code was:
customElementHelper.withDisambiguation('DoneReports');
and I got:
DOMException: Failed to execute 'define' on 'CustomElementRegistry': "mgt-DoneReports-flyout" is not a valid custom element name
when loading.
Changed to customElementHelper.withDisambiguation('done-reports');
and it is good now.
In the docs they suggest using the solution name which is all lowercase.
Thanks again
Oh, I never even thought about the lower case requirement when calling customElemtents.define. we can absolutely add code that automatically changes the supplied string to lower case.
Added #2897 to track automatic lowercase conversion
Describe the bug Most my SPFx web parts Use MGT and I was happy to learn that "MGT v3 doesn't require the MGT-spfx package!" But without it I got error on the deployed webpart :
To Reproduce Steps to reproduce the behavior:
Expected behavior The web part should work.
Environment (please complete the following information):
if (!Providers.globalProvider) { Providers.globalProvider = new SharePointProvider(this.context); }
Additional context If adding mgt-spfx-vv3.sppkg to the tenant, The 3.1.3 webpart works fine. But all older web parts buit with 2.11.1 or les show error
I do not have the budget to change all older web part to 3.1.3