Table.ColA 'a Col.t represents a column (or set of columns) that defines a way to render cells from a row in the table that has type 'a.
val make :
?cell_attrs:('b -> Virtual_dom.Vdom.Attr.t list) ->
?header_attrs:Virtual_dom.Vdom.Attr.t list ->
string ->
get:('a -> 'b) ->
render:(Theme.t -> 'b -> Virtual_dom.Vdom.Node.t) ->
'a tmake builds a column for a row 'a by providing a getter 'a -> 'b and a renderer for the 'b. The first parameter is a string that is used for the label of the column.
header_attr is an optional attribute attached to the <th> element containing the label.
cell_attr is for building attribute that will be attached to the <td> element containing the rendered content of the cell.
val make_opt :
?cell_attrs:('b -> Virtual_dom.Vdom.Attr.t list) ->
?header_attrs:Virtual_dom.Vdom.Attr.t list ->
string ->
get:('a -> 'b option) ->
render:(Theme.t -> 'b -> Virtual_dom.Vdom.Node.t) ->
'a tmake_opt is the same as make except that the return value from get can be an option
val group :
?header_attrs:Virtual_dom.Vdom.Attr.t list ->
string ->
'a t list ->
'a tgroup produces a column group over the provided list of columns with the string parameter being used as the label for the group.
header_attr behaves the same as it does for the make function
The remaining "prime" functions in this module are identical to their "non-prime" versions except that the "label" argument is an arbitrary Vdom node.
val make' :
?cell_attrs:('b -> Virtual_dom.Vdom.Attr.t list) ->
?header_attrs:Virtual_dom.Vdom.Attr.t list ->
Virtual_dom.Vdom.Node.t ->
get:('a -> 'b) ->
render:(Theme.t -> 'b -> Virtual_dom.Vdom.Node.t) ->
'a tval group' :
?header_attrs:Virtual_dom.Vdom.Attr.t list ->
Virtual_dom.Vdom.Node.t ->
'a t list ->
'a tval make_opt' :
?cell_attrs:('b -> Virtual_dom.Vdom.Attr.t list) ->
?header_attrs:Virtual_dom.Vdom.Attr.t list ->
Virtual_dom.Vdom.Node.t ->
get:('a -> 'b option) ->
render:(Theme.t -> 'b -> Virtual_dom.Vdom.Node.t) ->
'a t