Skip to content

Commit 5986f69

Browse files
authored
Add onAfterClose override to the ColorPickerDialog example
Add workaround for known issue opening multiple dialogs.
1 parent d37433f commit 5986f69

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/spfx/extensions/guidance/using-custom-dialogs-with-spfx.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ In the extension manifest, configure the extension to have only one button. In t
179179
isBlocking: false
180180
};
181181
}
182+
183+
protected onAfterClose(): void {
184+
super.onAfterClose();
185+
186+
// Clean up the element for the next dialog
187+
ReactDOM.unmountComponentAtNode(this.domElement);
188+
}
182189

183190
@autobind
184191
private _submit(color: string): void {
@@ -291,4 +298,4 @@ To associate the custom dialog box with your custom ListView Command Set, add th
291298
292299
## See also
293300
294-
- [Overview of SharePoint Framework Extensions](../overview-extensions.md)
301+
- [Overview of SharePoint Framework Extensions](../overview-extensions.md)

0 commit comments

Comments
 (0)