diff --git a/Project.toml b/Project.toml index 41b86ca..b77c5db 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "TableView" uuid = "40c74d1a-b44c-5b06-a7c1-6cbea58ea978" -version = "0.7.0" +version = "0.7.1" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/TableView.jl b/src/TableView.jl index 7d8a9f8..881dd19 100644 --- a/src/TableView.jl +++ b/src/TableView.jl @@ -53,18 +53,19 @@ showtable(table::AbstractMatrix; kwargs...) = showtable(Tables.table(table); kwa Return a `WebIO.Scope` that displays the provided `table`. Optional arguments: - - `options`: Directly passed to agGrid's `Grid` constructor. Refer to the - [documentation](https://www.ag-grid.com/documentation/) for more info. - - `options_mutator!`: Runs on the `options` dictionary populated by TableView and allows for - customizing the grid (at your own risk -- you can break the package by - supplying invalid options). - - `dark`: Switch to a dark theme. - - `title`: Displayed above the table if non-empty; - - `height`/`width`: CSS attributes specifying the output height and with. - - `cell_changed`: Either `nothing` or a function that takes a single argument with the fields - `"new"`, `"old"`, `"row"`, and `"col"`. This function is called whenever the - user edits a table field. Note that all values will be strings, so you need to - do the necessary conversions yourself. + +- `options`: Directly passed to agGrid's `Grid` constructor. Refer to the + [documentation](https://www.ag-grid.com/documentation/) for more info. +- `options_mutator!`: Runs on the `options` dictionary populated by TableView and allows for + customizing the grid (at your own risk -- you can break the package by + supplying invalid options). +- `dark`: Switch to a dark theme. +- `title`: Displayed above the table if non-empty; +- `height`/`width`: CSS attributes specifying the output height and with. +- `cell_changed`: Either `nothing` or a function that takes a single argument with the fields + `"new"`, `"old"`, `"row"`, and `"col"`. This function is called whenever the + user edits a table field. Note that all values will be strings, so you need to + do the necessary conversions yourself. """ function showtable(table; options::Dict{Symbol, Any} = Dict{Symbol, Any}(), @@ -273,6 +274,9 @@ function _showtable_async!(w, schema, types, rows, tablelength, id, options, opt onimport(w, handler) end +# By default all objects must use repr or sprint +_is_javascript_safe(x::Real) = false + function _is_javascript_safe(x::Integer) min_safe_int = -(Int64(2)^53-1) max_safe_int = Int64(2)^53-1