add removal of widgets in widgetArray
This commit is contained in:
@@ -67,7 +67,7 @@ export default function Home({...props}) {
|
||||
const DeleteWidget = (ID) => {
|
||||
console.log("Deleting widget with id: ", ID);
|
||||
setLayout(layout => layout.filter(w => w.i !== ID));
|
||||
// add removal for widgetArray here
|
||||
setWidgetArray(widgetArray => widgetArray.filter(w => w.i !== ID));
|
||||
}
|
||||
|
||||
const DeleteAll = () => {
|
||||
|
||||
Reference in New Issue
Block a user