Commit db164d0e authored by PDuarte's avatar PDuarte

remove page block UI fix

parent 21a61d7e
......@@ -115,14 +115,11 @@ const handleError = (text) => {
},
handleRMBlock = (value) => {
console.log(`Removing Block ${value}`)
const data = [...dataElement.menu_page_layouts]
const newData = data.filter((item, index) => index !== value)
setActiveTab(0)
setElementData({
...dataElement,
menu_page_layouts : newData
})
const newData = dataElement
newData.menu_page_layouts = dataElement.menu_page_layouts.filter((item, index) => index !== value)
setElementData(newData)
setActiveTab(newData.menu_page_layouts.length - 1)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment