hpet
hpet

Reputation: 299

shieldui widget integration - autosized tab with autosized grid

Can you please show me how to setup a tab widget containing grid widget, where tab widget is auto-sized to its container and grid is auto-sized to tab container (and properly scrollable). Thank you.

Upvotes: 1

Views: 78

Answers (2)

Vladimir Georgiev
Vladimir Georgiev

Reputation: 1949

This is possible - here is a JSBin example.

To make it complete, you will have to consider things like:

  • throttling the resize event handling,
  • tweak the CSS styles - paddings, borders, etc,
  • calculation of dimensions,
  • saving and restoring Grid state (current page, selection, etc)...

Upvotes: 1

Expressingx
Expressingx

Reputation: 1572

I assume this is what u need

https://jsbin.com/didiqa/4/edit?output

Just use CSS over the Tab widget divs to get overflow-y. The grid widget also have a property called scrolling which gives u an vertical scrolling if the columns width are bigger than the grid. You can check it here.

#tabsDiv {
   height: 250px;
   overflow: scroll; 
}

Upvotes: 2

Related Questions