Merge pull request #30788 from jboeijenga/fix/clear-custom-homepage-layout
fix(home): Prevent clearAll method from removing non-deletable widgets in custom homepage layout
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-home': patch
|
||||
---
|
||||
|
||||
Fixed bug in CustomHomepageGrid where `clearAll` did not respect the `deletable` flag on widgets
|
||||
@@ -275,7 +275,7 @@ export const CustomHomepageGrid = (props: CustomHomepageGridProps) => {
|
||||
};
|
||||
|
||||
const clearLayout = () => {
|
||||
setWidgets([]);
|
||||
setWidgets(widgets.filter(w => !w.deletable));
|
||||
};
|
||||
|
||||
const changeEditMode = (mode: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user