From 0a56a528faebeda2b904386859ec918b466bf374 Mon Sep 17 00:00:00 2001 From: e11sy <130844513+e11sy@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:20:57 +0300 Subject: [PATCH] fix add tab behaviour --- src/ListTabulator/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ListTabulator/index.ts b/src/ListTabulator/index.ts index 88fac50..afd92c9 100644 --- a/src/ListTabulator/index.ts +++ b/src/ListTabulator/index.ts @@ -992,6 +992,15 @@ export default class ListTabulator { prevItem.appendChild(prevItemChildrenListWrapper); } + const currentItemChildWrapper = getItemChildWrapper(currentItem); + + /** + * Remove child wrapper after moving all children + */ + if (currentItemChildWrapper !== null) { + removeChildWrapperIfEmpty(currentItemChildWrapper); + } + focusItem(currentItem, false); }