FlexLayout icon indicating copy to clipboard operation
FlexLayout copied to clipboard

using flexlayout without tabview

Open adilyoltay opened this issue 5 years ago • 8 comments

Is there any option to using FlexLayout without tabview. I only want to enable tabview when window inside to each other I hope I could explain

react-mosaicc

adilyoltay avatar Aug 10 '20 12:08 adilyoltay

By using the global options tabSetEnableTabStrip:false, tabSetHeaderHeight:true and with only a single tab in a tabset then it will look similar, to prevent the ability to drop into a tabset you would need to call the model setOnAllowDrop(fn) with a function of the form: (dragNode: Node, dropInfo: DropInfo) => boolean that prevents docking into the center

nealus avatar Aug 20 '20 08:08 nealus

Hi @nealus, have tried adding those options as you suggested but the header is not showing for me, the header is getting placed behind the panel making it not visible. My code is available here on the codesandbox

nelsieborja avatar May 07 '21 14:05 nelsieborja

I have the same case. I could not solve the problem

adilyoltay avatar May 08 '21 14:05 adilyoltay

With tabSetEnableDrop: false you can prevent dropping into a tabset, so it only has one child, this will still show as a tab, but you could change the css to remove the tab background e.g: change/remove .flexlayout__tab_button--selected background-color you can also remove the close with tabEnableClose: false

Those changes may get you closer to what you want

nealus avatar May 08 '21 15:05 nealus

image

nealus avatar May 08 '21 15:05 nealus

@nealus that works for me, thanks! Just notice an issue while dragging from outside - it always attempts to drop at the border area first even after setting borderEnableDrop to false, see the red dot inside the border area in the ss below

drop issue

nelsieborja avatar May 10 '21 13:05 nelsieborja

thanks for reporting that, I've checked in a change that should fix the red dot

nealus avatar May 10 '21 14:05 nealus

thanks for your support..

image

adilyoltay avatar May 11 '21 10:05 adilyoltay