sScrollY in a JQuery Tab, using UI.Layout

sScrollY in a JQuery Tab, using UI.Layout

ablelinkablelink Posts: 6Questions: 0Answers: 0
edited October 2011 in Bug reports
Hey Folks!

What I would like is to have my DataTable fill the available space in the Tab, and use scrolling via sScrollY. What happens is the table extends past the bottom of the area in question, so the footer never shows up and so the bottom entries are always invisible.

I've tried several things with sScrollY: 100%, 98%, 50%... etc, and a fixed pixel amount. The fixed pixel amount works every time, but the % values never work. With any percent, no scrollbar ever appears, acting as if the height of the area is infinite.

Secondly, if I use a fixed pixel amount, and the number of elements becomes smaller than the needed row space, the rows expand in size, so they fill the container height, with or without bScrollCollapse turned on. I do not expect that behavior!

I have similar tables in an accordion, and the behave perfectly. It's only in the tab containers that I'm having these fits!

Any thoughts?

Thanks!

- Brian

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    I believe the % code fails because the panel in your accordion/tabs is not visible at the time the code is called, so the % of a non-visible or non-displayed container is undefined or 0.

    perhaps don't call .dataTable() until the tab is shown for the first time.
  • ablelinkablelink Posts: 6Questions: 0Answers: 0
    edited October 2011
    Ok, I changed the code to not call .dataTable() until the "tabsshow" event is triggered, but the behavior is the same.

    At this point, it doesn't seem like a DataTables problem at all.. I have a div containing the tabs, which, for example, might have a height of 856px. The next contained element, with it is a div.ui-content-layout or div.ui-tabs-panel, would have a height of 1041. I cannot of the life of me figure out what is changing this to be a couple of hundred pixels bigger that it's container, with the heights being set to "100%"

    Any more ideas?


    - Brian
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    have you returned any debug data to make sure that the "tabsshow" event is the right timing for this event? it's possible tabsshow event is triggered before the tab is drawn. maybe there's another event or callback more appropriate.
This discussion has been closed.