FlexLayout icon indicating copy to clipboard operation
FlexLayout copied to clipboard

Question - is there a way to prevent a tab from being resized?

Open andrew-mclachlan opened this issue 4 years ago • 4 comments

I'd like to create a fixed tab that cannot be resized (or maximized etc.)

Is it possible to configure that? And if so, how would I do that?

Thanks in advance! Great code! Appreciated!

andrew-mclachlan avatar Aug 03 '20 16:08 andrew-mclachlan

did you find any solution ?

OmarMohamed11 avatar Nov 25 '20 11:11 OmarMohamed11

the only way I found it to work but it's a bit hacky is to set "splitterSize" to 0 in the global configuration

OmarMohamed11 avatar Nov 25 '20 11:11 OmarMohamed11

I accidentally stumbled on the solution for your problem when trying to trigger window resize event.

Action gets blocked when you capture it and then not return it.

    <FlexLayout.Layout
      realtimeResize
      model={FlexLayout.Model.fromJson(json)}
      factory={factory}
      onAction={(e) => {
        window.dispatchEvent(new Event('resize'))
        return e
      }}
    />

andraz avatar Dec 22 '21 11:12 andraz

Amazing! Thank you!

andrew-mclachlan avatar Dec 22 '21 18:12 andrew-mclachlan