@@ -54,14 +54,14 @@ function _showtable(table, dark)
54
54
55
55
w. dom = dom " div#grid" (className = " ag-theme-balham$(dark ? " -dark" : " " ) " ,
56
56
style = Dict (" width" => " 100%" ,
57
- " min-width " => " 400px " ,
58
- " height" => " 800px " ))
57
+ " height " => " 100% " ,
58
+ " min- height" => " 200px " ))
59
59
w
60
60
end
61
61
62
62
function _showtable_sync! (w, names, types, rows, coldefs, tablelength, dark)
63
63
options = Dict (
64
- :rowData => table2json (rows, names, types),
64
+ :rowData => JSONText ( table2json (rows, names, types) ),
65
65
:columnDefs => coldefs,
66
66
:enableSorting => true ,
67
67
:enableFilter => true ,
@@ -71,7 +71,6 @@ function _showtable_sync!(w, names, types, rows, coldefs, tablelength, dark)
71
71
72
72
handler = @js function (agGrid)
73
73
@var gridOptions = $ options
74
- gridOptions. rowData = JSON. parse (gridOptions. rowData)
75
74
this. table = @new agGrid. Grid (this. dom. querySelector (" #grid" ), gridOptions)
76
75
gridOptions. columnApi. autoSizeColumns ($ names)
77
76
end
@@ -83,13 +82,13 @@ function _showtable_async!(w, names, types, rows, coldefs, tablelength, dark)
83
82
rowparams = Observable (w, " rowparams" , Dict (" startRow" => 1 ,
84
83
" endRow" => 100 ,
85
84
" successCallback" => @js v -> nothing ))
86
- requestedrows = Observable (w, " requestedrows" , " " )
85
+ requestedrows = Observable (w, " requestedrows" , JSONText ( " {} " ) )
87
86
on (rowparams) do x
88
- requestedrows[] = table2json (rows, names, types, requested = [x[" startRow" ], x[" endRow" ]])
87
+ requestedrows[] = JSONText ( table2json (rows, names, types, requested = [x[" startRow" ], x[" endRow" ]]) )
89
88
end
90
89
91
90
onjs (requestedrows, @js function (val)
92
- ($ rowparams[]). successCallback (JSON . parse ( val) , $ (tablelength))
91
+ ($ rowparams[]). successCallback (val, $ (tablelength))
93
92
end )
94
93
95
94
options = Dict (
0 commit comments