@@ -50,12 +50,13 @@ display(Inputs.table(await sql`SELECT * FROM aapl`, {columns: ["Date", "Open"]})
50
50
// TODO sorting should be stable.
51
51
// TODO clip & center categorical/ordinal labels (needs measuring text).
52
52
// TODO instead of "other", count "uniques" as in data table cells?
53
+ // TODO display nulls cf. https://github.com/observablehq/inputs/pull/214
53
54
import * as _Inputs from " npm:@observablehq/inputs"
54
55
import * as Arrow from " npm:apache-arrow" ;
55
56
import * as d3 from " npm:d3" ;
56
57
import {html } from " npm:htl" ;
57
58
58
- width; // refresh when resized
59
+ width; // refresh when resized (TODO: OK to remove this?)
59
60
60
61
const Inputs = ({... _Inputs, table});
61
62
@@ -117,8 +118,8 @@ function table(data, options = {}) {
117
118
const _data = index === index0 ? data : take (data, index);
118
119
table .replaceWith (table = _Inputs .table (_data, options));
119
120
d3 .select (table)
120
- .style (" min-width" , ` ${ 120 * fields .length } px` )
121
- .style (" max-width" , ` ${ 280 * fields .length } px` );
121
+ .style (" min-width" , ` ${ 120 * fields .length } px` )
122
+ .style (" max-width" , ` ${ 280 * fields .length } px` );
122
123
const th = d3 .select (table).selectAll (" th" );
123
124
th .append ((d , i ) => thtype[i]);
124
125
th .append ((d , i ) => thsummary[i]);
0 commit comments