caplin / FlexLayout

Docking Layout Manager for React
MIT License
938 stars 175 forks source link

Error "undefined selectedTab should not happen" using enableDeleteWhenEmpty false #340

Closed jugglingcats closed 2 years ago

jugglingcats commented 2 years ago

Describe the bug

This may be related to #252 but is reproducible without using the API, so am raising as a new issue.

When you drag a tabset (not tab) into the empty tabset error occurs and the tab in the tabset is not rendered.

Your Example Website or App

https://codesandbox.io/s/flexlayout-react-empty-tabset-issue-wm4hbk

Steps to Reproduce the Bug or Issue

  1. Drag one of the tabs from the left into the centre of the empty tabset on the right
  2. Drag this tab to the top of the right-hand tabset to make a vertical row and empty tabset below
  3. Drag the whole upper tabset (not the tab) to the centre of the empty tabset below

Expected behavior

Expected the whole tabset to be moved into the empty tabset.

Operating System

Windows

Browser Type?

Chrome

Browser Version

105

Screenshots or Videos

chrome_glK1ZmwaNC

Additional context

No response

nealus commented 2 years ago

Hi, thanks for reporting that, I've just added a fix and will build a new version