Skip to content

Commit aec86f6

Browse files
author
Ran Gal
committed
The user can now supply a callback function that will be called just before rendering the table, allowing changes in the columns definitions (disable sorting, make read-only, remove from display etc.). It the future we can store the “dom” node in options to allow the user to change that too.
we had to remove the callback function entry from options dictionary as it cause the JS serilization process to fail
1 parent 7b0a13e commit aec86f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/TableView.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ function showtable(table, options::Dict{Symbol, Any} = Dict{Symbol, Any}();
190190
)
191191
)
192192

193+
# allow a user to modify some of the table settings using a call back function supplied in the options argument
194+
# we need to remove the callback function key from options as it cause the JS serilization process to fail
195+
haskey(options, :userCallbackFunc) && ((options[:userCallbackFunc])(options) ; delete!(options, :userCallbackFunc))
196+
193197
showfun = async ? _showtable_async! : _showtable_sync!
194198

195199
showfun(w, schema, names, types, rows, coldefs, tablelength, id, options)

0 commit comments

Comments
 (0)