nillud-data-table 1.3.4 → 1.3.6

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.
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ type Column = {
16
16
  sortable?: boolean;
17
17
  filterable?: boolean;
18
18
  selectable?: boolean;
19
+ isSelectableCell?: boolean;
19
20
  filterPlaceholder?: string;
20
21
  };
21
22
  type Columns = Column[];
package/dist/index.js CHANGED
@@ -122,10 +122,12 @@ var Cell = ({
122
122
  {
123
123
  className: "ndt-cell",
124
124
  title: isTitles && stringValue ? stringValue : "",
125
+ onClick: typeof column.isSelectableCell === "undefined" || column.isSelectableCell ? onRowSelect : () => {
126
+ },
125
127
  children: content
126
128
  }
127
129
  );
128
- const renderSelectableCell = () => /* @__PURE__ */ jsx5("div", { className: "ndt-cell ndt-checkbox-cell", children: /* @__PURE__ */ jsx5("input", { type: "checkbox", checked: !!isRowSelected }) });
130
+ const renderSelectableCell = () => /* @__PURE__ */ jsx5("div", { className: "ndt-cell ndt-checkbox-cell", onClick: onRowSelect, children: /* @__PURE__ */ jsx5("input", { type: "checkbox", checked: !!isRowSelected }) });
129
131
  return /* @__PURE__ */ jsx5(Fragment3, { children: column.selectable ? renderSelectableCell() : renderCell() });
130
132
  };
131
133
  var Cell_default = Cell;
@@ -148,7 +150,6 @@ var Row = ({
148
150
  {
149
151
  className: `ndt-table-row ${isSelectable && "ndt-table-row-selectable"} ${isRowSelected && "ndt-table-row-selected"}`,
150
152
  style: { gridTemplateColumns: widths },
151
- onClick: onRowSelect,
152
153
  children: columns.map((column, id) => /* @__PURE__ */ jsx6(
153
154
  Cell_default,
154
155
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nillud-data-table",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",