@hypericon/mico 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,8 +22,8 @@ const mithril_1 = __importDefault(require("mithril"));
22
22
  */
23
23
  function typedTable() {
24
24
  const typedTable = exports.Table;
25
- const col = (header, cell) => {
26
- return { header, cell };
25
+ const col = (header, cell, options) => {
26
+ return { header, cell, options };
27
27
  };
28
28
  return Object.assign(Object.assign({}, typedTable), { col });
29
29
  }
@@ -49,15 +49,15 @@ exports.Table = {
49
49
  ]),
50
50
  ]),
51
51
  (0, mithril_1.default)("tbody", [
52
- attrs.data.map(item => {
52
+ attrs.data.map((item, dataIndex) => {
53
53
  return (0, mithril_1.default)("tr", [
54
- attrs.columns.map((col, index) => {
54
+ attrs.columns.map((col, colIndex) => {
55
55
  var _a, _b, _c;
56
56
  return (0, mithril_1.default)("td", {
57
57
  class: (_a = col.options) === null || _a === void 0 ? void 0 : _a.class,
58
58
  style: (_b = col.options) === null || _b === void 0 ? void 0 : _b.style,
59
59
  }, [
60
- (_c = col.cell) === null || _c === void 0 ? void 0 : _c.call(col, item, index),
60
+ (_c = col.cell) === null || _c === void 0 ? void 0 : _c.call(col, item, dataIndex),
61
61
  ]);
62
62
  }),
63
63
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypericon/mico",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "UI components and utilities with Mithril",
5
5
  "author": "Ed Johnson, Hypericon Ltd",
6
6
  "license": "MIT",