Commit 0e3e8103 authored by PDuarte's avatar PDuarte

fix remove last-1 page block

parent 8958de4a
......@@ -119,9 +119,14 @@ const handleError = (text) => {
newData.menu_page_layouts = dataElement.menu_page_layouts.filter((item, index) => index !== value)
setElementData(newData)
if (activeTab === newData.menu_page_layouts.length - 1) {
setActiveTab(0)
} else {
setActiveTab(newData.menu_page_layouts.length - 1)
}
}
useEffect(() => {
if (selectedElement !== null || (selectedElement !== null && dataElement !== null && selectedElement.id !== dataElement.id)) {
......
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