What is the difference between using scroller and stickyHeader? - tablesorter

I came across this question. I see that both stickyHeader and scroller works kind of the same in the way that they both keep the header row visible and there's a scroller bar on the side. Could someone please kindly explain the difference between them?

The stickyHeader widget makes the table head "stick" to the top of the browser, or table container (if options are set), window as the user scrolls down the table; this is similar to the sticky menu some sites use for site navigation. Check out this demo especially the last one on that page which is an example of nested tables stacking the sticky headers while you scroll down the document. There is also a css3 version of this widget which uses css3 transforms to position the table head at the top of the browser window.
The scroller widget, on the other hand, has to make a copy of the table header placed above the table, hides the original table header, then makes the tbody of the table scrollable, within a fixed height. So, the browser window position doesn't change which the user is scrolling through the table content, just a scrollable window of content is seen. If you look at this demo, you'll see that the table body is scrollable, but the head does not "stick" to the browser window (unless you set the scroller_jumpToHeader which forces the table head to become visible while scrolling up the document.

Related

Vaadin large table scrolls inside table (and underneath header) instead of scrolling page

Vaadin Version: 23.3.3
I have a fairly complex Vaadin table, ~100 rows, each of which contains ~12 columns, each column containing a layout with ~10 elements. The table is not lazy in any way, and is configured to show all rows at once.
It takes the browser 5+ seconds just to render the table after the request is complete (a topic for a different question) but even once the table is rendered I experience some weirdness when scrolling.
When holding the mouse outside the table, or using the scroll bar, the page always scrolls as expected. But when I hold the mouse inside the table I get inconsistent results. If I have first scrolled the page all the way to the bottom then there appears to be no issue regardless of mouse position. But If I have yet to scroll to the bottom, then the table scrolls in place, pushing rows underneath the header (see screenshot). It's as if the browser/vaadin is not yet completely aware of the size of the table?
Is there something I need to be doing to force vaadin to render the entire page?
Edit: Upon some further testing I noticed even stranger inconsistencies. My table cells have two possible layouts depending on user actions. One is simple, containing: div > span > span. The other is more complex, containing a div > span > span + vaadin-icon + tooltip. The issue only appears when the table is rendered with the "simple" layout. Something about the added vaadin-icon and tooltip seems to make vaadin draw the table without scroll issues.

Vaadin: second scrollbar appearing seemingly randomly in AppLayout

My application is using a com.vaadin.flow.component.applayout.AppLayout with a header and a drawer (a standard layout inspired by misc. example programs). The lower right content part is populated with VerticalLayouts that have a #Route(value="foobar", layout = MainLayout.class) annotation, so when clicking on one of the "anchors" in the drawer the corresponding view is added.
That works all nice except for one thing that annoys me:
One of my views has four Accordion components (2 containing a couple of labels and a TextArea each, one containing some textfields and a chart. The forth contains some text fields and a button).
When I unfold these accordions then typically when expanding the third or fourth there is suddenly a second vertical scrollbar appearing just inside the outer, normal scrollbar. Already two opened accordions are higher than what fits a typical browser window, but here the size and the scrollbar is adjusted correctly. Sometimes, but strange enough not always, the scrollbar also adjusts properly with three opened accordions. Sometimes already with the 3rd, but definitely always with the 4th accordion that second scrollbar appears. The combination of opened accordions does not seem to play a role, i.e. there is no accordion that ALWAYS triggers that scrollbar appearing.
I find this second scrollbar most irritating and annoying when navigating the page. Any idea what could cause this? And how to force a single scrollbar only?
BTW: I experimented with wrapping the entire content inside a Div but that didn't change anything - the second scrollbar still appears as described above.

How to make auto expandable home page banner like

I have used the separate banner image and scroll view for category sections and tableview for records.
Need to make all things scrollable to topside and when the scroll position reached the top position category section would fixed at top position and the table view records would continue scrolling and once the scroll down all the object would displayed to their original position back to back well which is normally happen in android apps and whatsapp profile page.
Please share your answer if you have done like this.
Here is the link for DTParallaxTableView
QMBParallaxScrollViewController
This Library same you want MXSegmentedPager
May this helps lot.

iOS CollectionView with horizontal paging instead of vertical scrolling

I'm working on a project for a client. It's an iPad pdf reader. The client wants a collection view, but instead of scrolling vertically, he wants it to use a page control.
It's pretty hard to explain, but what I basically want is all the PDFs on the device in a grid, like on the iBooks app. When that grid overflows, I want to use a page control to display the extra elements on a second page (like in the weather app).
My thoughts on this were:
- Create a page control with one page.
- On that page, create a UICollectionView.
- If the number of elements is greater than 9 add a page to the page control and add another UICollectionView, until there are enough pages to display all elements.
However, this seems horribly inefficient, so my question is if there's a better way to do this.
If your goal is to scroll sideways you can just select that in the interface builder when you have the collection view selected. Then you can make the cell as big as you want. You can even enable paging on the collection view.
In the attributes inspector, right under layout is scroll direction. Set to horizontal.

Is there a way to Auto-scroll jquery-ui sortables in all connected lists?

Using jquery-ui's sortable plug-in, I have two connected lists that have scroll bars. I would like to be able to scroll as i drag an element from either list. Current behavior of the Sortable plugin is that if you have the scroll:true option, and no ui-helper (or a ui-helper that is appended to its original list) then the scrolling and dragging will only happen in this list and not the ones connected to it. If you have it appended to a div that contains all connected lists, then it won't scroll as you drag at all. Does anyone have a work around for this?
Here's my specific situation in more detail:
I have two connected list one below the other. The one on the top has a scroll bar. If I a drag an element from the top list to the bottom list, the scroll bars don't scroll down with the element, but the element's placeholder still stays in that list (just the hidden part that is not scrolled to). So, if i drop it there, it gets dropped in the top list rather than in the bottom list. This especially happens if the bottom list is empty.
I have a ui-helper appended to a div that contains all the connected lists.
Is there a way to make the scroll area scroll with the element? A less desirable, but still acceptable, alternative would be a way to make it prefer (on dropping) the list that is visible.

Resources