Forum Discussion
Modal dialog does not work in SPFx web part
Using SPFx with react (hooks) I am developing a web part with few components.
- One component should show as a modal dialog but never shows
- Another is a tooltip implementation and does not show at all too.
Does anyone have a good example? there is one for extensions but did not find one for the web part.
Thank you
5 Replies
- O365DeveloperBrass Contributor
Hi ,
Its so hard to say without seeing any code.Have you tried using the Office UI Fabric Dialog and Teaching Bubble for your requirements?
- Ofer-GalCopper Contributor
I tried "Office UI Fabric" Dialog. What is "Teaching Bubble "?
My test was a component using DetailsList example where each row had a button that called a component using Dialog or Panel. nither of them ever showed and the console showed CORS error.- O365DeveloperBrass Contributor
If you have Chrome,can you run chrome using disablewebsecurity which will disable the CORS issues for time being to verify that your content has been working properly or not in a Dialog
So you code is failing because of CORS issue,not because of the react component not getting rendered.
Teaching bubble is more of a tooltip kind of thing to display.Here is the link.
https://developer.microsoft.com/en-us/fabric#/controls/web/teachingbubble