The most essential aspect of a column is accessing the property holding the
data for that column on each object in the data array. If that member is at
the top level, Column can simply be a property accessor, which is either a
string (if it's a plain object) or a number (if it's an array).
constcolumns = [ "name", ];
Each property accessor will be used as the header for the column:
name
Deno
If the required data is not at the top level (it's nested in other
objects/arrays), then a simple property accessor won't work, so an array of
them will be required.
When using arrays of property accessors, the header names inherit the value
of the last accessor in each array:
name
org
deno
denoland
If a different column header is desired, then a ColumnDetails object type
can be used for each column:
header?: string is the optional value to use for the column header
name
prop: PropertyAccessor | PropertyAccessor[] is the property accessor
(string or number) or array of property accessors used to access the
data on each object
The most essential aspect of a column is accessing the property holding the data for that column on each object in the data array. If that member is at the top level,
Columncan simply be a property accessor, which is either astring(if it's a plain object) or anumber(if it's an array).Each property accessor will be used as the header for the column:
If the required data is not at the top level (it's nested in other objects/arrays), then a simple property accessor won't work, so an array of them will be required.
When using arrays of property accessors, the header names inherit the value of the last accessor in each array:
If a different column header is desired, then a
ColumnDetailsobject type can be used for each column:header?: stringis the optional value to use for the column header nameprop: PropertyAccessor | PropertyAccessor[]is the property accessor (stringornumber) or array of property accessors used to access the data on each object