@renderorange/alanbradley 2.0.0 → 2.0.1

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.
Files changed (2) hide show
  1. package/README.md +11 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -41,6 +41,9 @@ Or copy `src/alanbradley.js` and `src/alanbradley.css` into your project.
41
41
  { key: "id", label: "ID", sortable: true },
42
42
  { key: "name", label: "Name", sortable: true },
43
43
  { key: "status", label: "Status", sortable: true },
44
+
45
+ // add an empty column definition for the edit button below
46
+ { key: "", label: "", sortable: false },
44
47
  ],
45
48
  filters: [
46
49
  { key: "status", label: "Status", options: ["active", "closed"] },
@@ -48,11 +51,14 @@ Or copy `src/alanbradley.js` and `src/alanbradley.css` into your project.
48
51
  search_fields: ["name", "status"],
49
52
  render_row: function (item) {
50
53
  return (
51
- "<tr>" +
52
- '<td data-label="ID">' + item.id + "</td>" +
53
- '<td data-label="Name">' + item.name + "</td>" +
54
- '<td data-label="Status">' + item.status + "</td>" +
55
- "</tr>"
54
+ '<tr>' +
55
+ '<td data-label="ID">' + item.id + '</td>' +
56
+ '<td data-label="Name">' + item.name + '</td>' +
57
+ '<td data-label="Status">' + item.status + '</td>' +
58
+ '<td data-label=""><a href="/item/' +
59
+ item.id +
60
+ '/edit" class="btn btn-sm">Edit</a></td>' +
61
+ '</tr>'
56
62
  );
57
63
  },
58
64
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renderorange/alanbradley",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "lightweight table filter, sorting, and pagination library, with optional background chunking",
5
5
  "license": "MIT",
6
6
  "author": "Blaine Motsinger <blaine@renderorange.com>",