Closed vasanthkumarc94 closed 3 years ago
Since the property pane is defined in a separate class than the ACE (which has access to its property bag), you could try passing in properties
to getPropertyPaneConfiguration
yes I have tried that by passing the properties to the class by extending the BaseWebpart, unfortunately still I can see the properties not available.
@vasanthkumarc94 Since Adaptive Card Extensions are not web parts, you cannot extend from BaseWebPart
. @ms-nichoi's suggestion is to modify the getPropertyPaneConfiguration
signature in your code.
Something like this:
// MyPropertyPane.ts
public getPropertyPaneConfiguration(properties: IMyAdaptiveCardExtensionProperties): IPropertyPaneConfiguration {
....
}
// MyAdaptiveCardExtension.ts
protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
return this._deferredPropertyPane!.getPropertyPaneConfiguration(this.properties);
}
yes it worked for me... thank you @johnguy0
it worked... thank you for immediate response
Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you.
Versions
[ Windows ] Operating System [ 12.13 ] Node version [ 2.3.0 ] Gulp version [ ] SPFx Generator version (
npm list -g @microsoft/generator-sharepoint
)Expected or Desired Behavior
I am trying to get the webpart properties in the ***PropertyPane.ts file to do the Webpart property validation. Ex: disabled:this.properties.count?false:true
but I am not getting the webpart property in the propertypane.ts file. In normal SPFx webpart I will be able to get these webpart properties easily to do the validation.