0

I am recently trying the SPFx webpart for Drop 5. I understood that the drop 5 started to use @microsoft/sp-webpart-base instead of @microsoft/sp-client-preview. What I did was to add two dropdown controls and dropdownB's list was depended on dropdownA. As I understand correctly, the protected onPropertyChanged(propertyPath: string, oldValue: any, newValue: any): void method should be triggered whenever dropdownA is changed at reactive mode. However, this method didn't triggered when I connected to SPO. This method can be fired at local mode. Anyone has ideas about this? I kindly remembered it was fine on both local and SPO under Drop 4.

    protected onPropertyChanged(propertyPath: string, oldValue: any, newValue: any): void {
      console.log("onPropertyChanged: " + propertyPath);
      super.onPropertyChanged(propertyPath, oldValue, newValue);
  }
1

Two things.

  1. upgrade to drop 6 (https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-Drop-6)

  2. method signature has changed to "onPropertyPaneFieldChanged(...)" with the same parameters and return type as before.

  • Glad to see Drop 6 came out. I followed the Drop 6 instruction and I got the following error when WebPack built the package. [12:00:55] Error - [webpack] 'dist': ./~/@microsoft/sp-module-loader/lib/SystemJsWrapper.js Module not found: Error: Cannot resolve module 'raw-script' in – Verona Chen Nov 28 '16 at 20:15
  • If you create a webpart from scratch do you get the same error? Are you including any extra libraries in your code? – PatMill_MSFT Nov 28 '16 at 22:40
  • got a chance to deep dive this issue. This error happened when I created a brand-new project based on drop 6 and referenced a external css using ModuleLoader.loadCss('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css');. This issue was gone after I added "@microsoft/loader-raw-script": "0.0.5" in my package.json. However, I got another error [15:21:06] Error - [webpack] 'dist': ./~/@microsoft/sp-module-loader/lib/SPModuleLoader.resx.js Module not found: Error: Cannot resolve module 'resx-strings' in . It looks like Webpack missed this loader. – Verona Chen Nov 28 '16 at 23:54
  • Does this thread solve your issue - github.com/SharePoint/sp-dev-docs/issues/286 – PatMill_MSFT Nov 29 '16 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.