Comments (3)
+1
from fixed-header-table.
I am having this same problem. And what is worst is that if you need an horizontal scroll bar, and the table container is smaller than the specified height then the scroll bar appears way on the bottom....after a lot of empty space :(
from fixed-header-table.
In my case the problem was the following. I have lots of tables (reports), say 20 different tables. Yet, I use the same code for displaying them. Of course, at some point, I need a number to represent the hight for such tables, but I cannot made the too big and scroll because I may have several records. So say at some point I sadi: 'OK, height should be not more than 900px'. Perfect. But if I simply pass that value to the fixed table, it will use it as 'height' and I would use all the space. Sometimes, some of my tables may not that much rows, and hence, the space used by the table is less than 900px. Say it was 400px. So first, it is ugly that it uses 900px because 500px looks like empty. Second, what was worst in my case, for horizontal scrolls, they appear JUST AFTER the 900x ...quite far from there the table finished in this case (400px)...
So the way I solved it is to have my own div (tableContainer) and inside that div, the table. And then, add this css:
.tableContainer {
max-height: 900px;
}
.fht-table-wrapper {
max-height: 900px;
}
But..I wanted to set this 900px from javascript, because I wanted to calculate that as an approx. 80% of the height of the browser window. So now before calling the javascript table I do:
$(".tableContainer").css("max-height", (($(window).height()*0.8) +''px'') );
$(".fht-table-wrapper").css("max-height", (($(window).height()*0.8) +''px'') );
But...I didn't work right ahead. I had to add a "max-height: inherit; " to the defaultTheme.css:
.fht-table-wrapper,
.fht-table-wrapper .fht-thead,
.fht-table-wrapper .fht-tfoot,
.fht-table-wrapper .fht-fixed-column .fht-tbody,
.fht-table-wrapper .fht-fixed-body .fht-tbody,
.fht-table-wrapper .fht-tbody {
max-height: inherit;
.....
}
and there it worked as I expected.
from fixed-header-table.
Related Issues (20)
- Wrong width when there is no vertical scrolling needed
- Wrong width when padding was not included in width HOT 1
- how to use nicescroll in Fixed Header Table scrolling
- jQuery.mousewheel.js contains deprecated commands HOT 1
- Dragging an object in a 2e cell updates the width of the row but not on the fixed first cell
- Bug when table is hidden on load
- Layout not working on IE9 if number of rows are more.. 500+ rows
- Change default 960px to new width
- Support multiple tr in thead
- css tabs and fixed header table not working
- MS Code issues
- Form inputs in fixed columns
- Input field hidden behind fixed column when focused using tab
- Footer with more than one line does not fix columns
- TypeError: d.find(...).bind is not a function
- Colspan and Rowspan in th
- Issues running on Safari 10.1?
- Scrolling in froozen content
- Fix Manual Column
- fixedBodyHeight in _setupFixedColumn
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fixed-header-table.