I was watching the video here and I believe I have found a bug when creating the Custom Continent Selector Component.
When I started the project I did create my project from scratch, not from the repo. I believe the repo project was created with No framework. I created mine with React, then placed the code in appropriate spots to compensate. The first demo, without the Custom Component, worked without issue. However, at the end of the Custom Component demo everything seemed to work. However, when the Custom Component dropdown changed the value in the web part was blank.
After some troubleshooting I found, I believe, a bug in the .../src/controls/PropertyPaneContientSelector/components/ContinentSelector.tsx, specifically in the onChanged function:
I was watching the video here and I believe I have found a bug when creating the Custom Continent Selector Component.
When I started the project I did create my project from scratch, not from the repo. I believe the repo project was created with
No framework
. I created mine withReact
, then placed the code in appropriate spots to compensate. The first demo, without the Custom Component, worked without issue. However, at the end of the Custom Component demo everything seemed to work. However, when the Custom Component dropdown changed the value in the web part was blank.After some troubleshooting I found, I believe, a bug in the .../src/controls/PropertyPaneContientSelector/components/ContinentSelector.tsx, specifically in the onChanged function:
The last if statement is not reachable in any scenario, thus the component never updates - it should be:
Once the if statement is moved then the if statement can be evaluated and onChanged can be fired resulting in the updating of the component.
Side note - I added Oceania and Europe to the continents :)
Cheers