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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user