Commit 0e3e8103 authored by PDuarte's avatar PDuarte

fix remove last-1 page block

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