Pergunta

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);
  }
Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top