Skip to content

Commit 92cef72

Browse files
committed
fix date column alignment; todos
1 parent 5573a98 commit 92cef72

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/summary-table.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ display(Inputs.table(await sql`SELECT * FROM aapl`, {columns: ["Date", "Open"]})
4141
```
4242

4343
```js echo
44+
// TODO reset button (in the tally).
45+
// TODO rename types (Utf8 => string, Date32 => Date…).
46+
// TODO control the width of the tally for small tables.
47+
// TODO the height of the table should not shrink when filtering.
4448
import * as _Inputs from "npm:@observablehq/inputs"
4549
import * as Arrow from "npm:apache-arrow";
4650
import * as d3 from "npm:d3";
4751
import {html} from "npm:htl";
4852

4953
width; // refresh when resized
5054

51-
const Inputs = ({..._Inputs, table})
55+
const Inputs = ({..._Inputs, table});
5256

5357
function table(data, options = {}) {
5458
if (!data) return data;
@@ -276,7 +280,7 @@ async function summary(div, filters, refresh) {
276280
});
277281
d3.select(chart).append("g").call(brush);
278282
}
279-
div.append(chart ? html`<div style=${type === "Utf8" ? "" : {
283+
div.append(chart ? html`<div style=${type === "Utf8" || `${type}`.startsWith("Date") ? "" : {
280284
position: "absolute",
281285
right: 0
282286
}}>${chart}` : html`<span>Unknown type ${type}`);

0 commit comments

Comments
 (0)