Skip to content

Commit dcd053c

Browse files
author
Shashi Gowda
committed
calculate height based on number of rows.
1 parent 08f035e commit dcd053c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/TableView.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function showna(xs::Columns)
2222
rows(map(showna, columns(xs)))
2323
end
2424

25-
function showtable(t::Union{DNextTable, NextTable}; rows=1:100, colopts=Dict(), kwargs...)
25+
function showtable(t::Union{DNextTable, NextTable}; rows=1:100, colopts=Dict(), height=nothing, kwargs...)
2626
w = Scope(imports=["https://cdnjs.cloudflare.com/ajax/libs/handsontable/0.34.0/handsontable.full.js",
2727
"https://cdnjs.cloudflare.com/ajax/libs/handsontable/0.34.0/handsontable.full.css"])
2828

@@ -39,9 +39,8 @@ function showtable(t::Union{DNextTable, NextTable}; rows=1:100, colopts=Dict(),
3939
:modifyRowHeight => @js(h -> h > 60 ? 50 : h),
4040
:manualColumnResize => true,
4141
:manualRowResize => true,
42+
:height => height === nothing ? length(subt) * 24 + 45 : height,
4243
:columns => cols,
43-
:width => 800,
44-
:height => 400,
4544
)
4645
if (length(t.pkey) > 0 && t.pkey == [1:length(t.pkey);])
4746
options[:fixedColumnsLeft] = length(t.pkey)

0 commit comments

Comments
 (0)