Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STCOM-1386 Paneset: check for existing id before registering pane (#2395
) Panes can exhibit strange behavior in the dev environment that just doesn't happen in production. I believe this is caused by pane registration misbehaving in React StrictMode (where mounting happens twice). This PR dedupes the panes by checking if a pane id already exists in the paneset - and if it does, the pane is not added. Problematic behavior can be seen specifically with panes that have `defaultWidth: "fill"` - they'll be registered twice, and their width calculation (which divides the remaining width among other `fill` panes) will leave them being half the size they should be. Hiding a search/filter pane can leave the results view at only 50% of its width, when it should be the full width of the view when it's the only pane.
- Loading branch information