Merge pull request #30994 from zeshanziya/fix-clearall-deletable-issue

fix(home): Correct clearAll logic to properly handle deletable flag in CustomHomepageGrid
This commit is contained in:
Fredrik Adelöw
2025-10-03 14:08:28 +02:00
committed by GitHub
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-home': patch
---
fix(home): correct `clearAll` logic to properly handle `deletable` flag
@@ -37,6 +37,7 @@ const defaultConfig = [
y: 0,
width: 24,
height: 2,
deletable: false,
},
{
component: 'HomePageRecentlyVisited',
@@ -282,7 +282,7 @@ export const CustomHomepageGrid = (props: CustomHomepageGridProps) => {
};
const clearLayout = () => {
setWidgets(widgets.filter(w => !w.deletable));
setWidgets(widgets.filter(w => w.deletable === false));
};
const changeEditMode = (mode: boolean) => {