IPropertyPaneAccessor interface
Web part context property pane accessor interface. Provides some most commonly used operations to access the property pane and content panel.
Methods
close() | This API should be used to close the PropertyPane or Content Panel to help configure the web part. |
is |
Returns true if the ContentPanel is open. |
is |
Returns true if the PropertyPane is open. |
is |
Returns true if the Content Panel is open and the specified instanceId is supported in the content panel. OR Returns true if the Property panel is open and the specified instanceId is supported in the properties pane. |
is |
Indicates whether the PropertyPane/Content Panel was initially opened by the web part. |
open() | This API should be used to open the PropertyPane or Content Panel to help configure the web part. |
open |
This API should be used to open the Details PropertyPane/Content Panel to help configure the items in the web part. |
refresh() | This API should be used to invoke the PropertyPane or Content Panel to help configure the web part. |
Method Details
close()
This API should be used to close the PropertyPane or Content Panel to help configure the web part.
close(): void;
Returns
void
isContentPanelOpen()
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Returns true if the ContentPanel is open.
isContentPanelOpen(): boolean;
Returns
boolean
Remarks
Returns true if the Content Panel is open, regardless if the Content Panel is rendering the property pane.
isPropertyPaneOpen()
Returns true if the PropertyPane is open.
isPropertyPaneOpen(): boolean;
Returns
boolean
Remarks
This is true whenever the Property Pane is open whether it is hosted in the Content Panel or traditional Property Pane UI.
isPropertyPaneOpen(instanceId)
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Returns true if the Content Panel is open and the specified instanceId is supported in the content panel. OR Returns true if the Property panel is open and the specified instanceId is supported in the properties pane.
isPropertyPaneOpen(instanceId?: string): boolean;
Parameters
- instanceId
-
string
Returns
boolean
isRenderedByWebPart()
Indicates whether the PropertyPane/Content Panel was initially opened by the web part.
isRenderedByWebPart(): boolean;
Returns
boolean
Remarks
For example, if the web part calls this.context.propertyPane.open() then the property would be true, whereas if the configuration was opened by the host, then the value will be false.
open()
This API should be used to open the PropertyPane or Content Panel to help configure the web part.
open(): void;
Returns
void
openDetails(context)
This API should be used to open the Details PropertyPane/Content Panel to help configure the items in the web part.
openDetails(context?: any): void;
Parameters
- context
-
any
Add additional context for property pane or content panel
Returns
void
Remarks
This API is mainly used for configuring Details, which is different from configuring the web part itself.
refresh()
This API should be used to invoke the PropertyPane or Content Panel to help configure the web part.
refresh(): void;
Returns
void
Remarks
This operation only works when the PropertyPane is already open for the currently active web part. If the PropertyPane is opened for another web part, calling the refresh API will have no impact.