gdepourtales / ng-cells

AngularJS Table directive that draws a table of data with different features
http://gdepourtales.github.io/ng-cells/
Other
77 stars 17 forks source link

Set scrollbars to window #33

Open MaestroJurko opened 9 years ago

MaestroJurko commented 9 years ago

Is it possible to set scrollbars to window instead of table? I have a table inside the main content and I scroll the table with window scrollbars (it took some time to develop that).

Any possibility?

kayhadrin commented 9 years ago

Could you clarify or give the URL of a live demo of what you have in mind?

AFAIK, maybe what you'd like can be achieve by adding this css rule:

.ngc.scroll-wrapper.vertical {
  visibility: hidden;
}
kayhadrin commented 9 years ago

Oops, I didn't notice the change of scrollbar done in 0.4. So my suggestion is only valid for 0.3.x.

gdepourtales commented 9 years ago

@mato75 , I created a small gist how you can start getting what you want : https://gist.github.com/gdepourtales/a912fbbf681382de15e4

I've put a big div that should be bigger than the window. When you scroll either horizontally or vertically the content of the table is updated. The table holds a fixed position on the top left.

Obviously the size of the big div should be relative to the size of the window and be calculated to fit the size of your table content but how to bind window scroll to table scroll is there.

Is it something like this you're looking for ?