Skip to content

Commit 43ff27a

Browse files
authored
Merge pull request primefaces#3407 from jxmai/PF_3406
Fix primefaces#3406 - TreeTable - support scrollheight in vh
2 parents 1993b87 + 690824b commit 43ff27a

File tree

1 file changed

+8
-0
lines changed
  • src/main/resources/META-INF/resources/primefaces/treetable

1 file changed

+8
-0
lines changed

src/main/resources/META-INF/resources/primefaces/treetable/treetable.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,10 @@ PrimeFaces.widget.TreeTable = PrimeFaces.widget.DeferredWidget.extend({
988988
if(this.cfg.scrollHeight.indexOf('%') !== -1) {
989989
this.adjustScrollHeight();
990990
}
991+
992+
if(this.cfg.scrollHeight.indexOf('vh') !== -1) {
993+
this.applyViewPortScrollHeight();
994+
}
991995

992996
var marginRight = this.getScrollbarWidth() + 'px';
993997
this.scrollHeaderBox.css('margin-right', marginRight);
@@ -1094,6 +1098,10 @@ PrimeFaces.widget.TreeTable = PrimeFaces.widget.DeferredWidget.extend({
10941098

10951099
this.scrollBody.height(height);
10961100
},
1101+
1102+
applyViewPortScrollHeight: function() {
1103+
this.scrollBody.height(this.cfg.scrollHeight);
1104+
},
10971105

10981106
adjustScrollWidth: function() {
10991107
var width = parseInt((this.jq.parent().innerWidth() * (parseInt(this.cfg.scrollWidth) / 100)));

0 commit comments

Comments
 (0)