@@ -199,14 +199,15 @@ end
199
199
200
200
function _showtable_sync! (w, schema, names, types, rows, coldefs, tablelength, id, options)
201
201
options[:rowData ] = JSONText (table2json (schema, rows, types))
202
+ license = get (ENV , " AG_GRID_LICENSE_KEY" , nothing )
202
203
handler = @js function (RowNumberRenderer, agGrid)
203
204
@var gridOptions = $ options
204
205
@var el = document. getElementById ($ id)
205
206
gridOptions. components = Dict (
206
207
" rowNumberRenderer" => RowNumberRenderer
207
208
)
208
- if $ (haskey ( ENV , " AG_GRID_LICENSE_KEY " ))
209
- agGrid. LicenseManager. setLicenseKey ($ ( ENV [ " AG_GRID_LICENSE_KEY " ]) )
209
+ if $ (! isnothing (license ))
210
+ agGrid. LicenseManager. setLicenseKey ($ license )
210
211
end
211
212
this. table = @new agGrid. Grid (el, gridOptions)
212
213
gridOptions. columnApi. autoSizeAllColumns ()
@@ -239,6 +240,7 @@ function _showtable_async!(w, schema, names, types, rows, coldefs, tablelength,
239
240
,
240
241
" rowCount" => tablelength
241
242
)
243
+ license = get (ENV , " AG_GRID_LICENSE_KEY" , nothing )
242
244
243
245
handler = @js function (RowNumberRenderer, agGrid)
244
246
@var gridOptions = $ options
@@ -247,8 +249,8 @@ function _showtable_async!(w, schema, names, types, rows, coldefs, tablelength,
247
249
gridOptions. components = Dict (
248
250
" rowNumberRenderer" => RowNumberRenderer
249
251
)
250
- if $ (haskey ( ENV , " AG_GRID_LICENSE_KEY " ))
251
- agGrid. LicenseManager. setLicenseKey ($ ( ENV [ " AG_GRID_LICENSE_KEY " ]) )
252
+ if $ (! isnothing (license ))
253
+ agGrid. LicenseManager. setLicenseKey ($ license )
252
254
end
253
255
this. table = @new agGrid. Grid (el, gridOptions)
254
256
gridOptions. columnApi. autoSizeAllColumns ()
0 commit comments