简体   繁体   中英

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.

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; 
}

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)...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM