mig-schema-table 3.0.120 → 3.0.121

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.
@@ -84,7 +84,7 @@ const Th = ({ columnFilterStatus, isAllChecked, isSortable, numberOfSelectedRows
84
84
  e.dataTransfer.dropEffect = "move";
85
85
  e.dataTransfer.setData("text/plain", propName);
86
86
  }, [onColumnPositionChange, propName]);
87
- const onDragEnd = React.useCallback((e) => {
87
+ const onDragEnd = React.useCallback(() => {
88
88
  if (!onColumnPositionChange) {
89
89
  return;
90
90
  }
@@ -108,7 +108,7 @@ const Th = ({ columnFilterStatus, isAllChecked, isSortable, numberOfSelectedRows
108
108
  return;
109
109
  }
110
110
  const sourcePropName = e.dataTransfer.getData("text/plain");
111
- if (!sourcePropName) {
111
+ if (!sourcePropName || sourcePropName === propName) {
112
112
  return;
113
113
  }
114
114
  onColumnPositionChange(sourcePropName, propName);
@@ -136,6 +136,6 @@ const Th = ({ columnFilterStatus, isAllChecked, isSortable, numberOfSelectedRows
136
136
  classNames.push(`text-${propConfig.align}`);
137
137
  }
138
138
  }
139
- return (_jsxs("div", Object.assign({ style: style, className: classNames.join(" "), title: title }, { children: [_jsxs("div", Object.assign({ className: "schema-table__th__label-body", style: { lineHeight: "44px" }, onClick: onLabelClick, draggable: true, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop }, { children: [_jsx("span", Object.assign({ className: "schema-table__th__label-body-text" }, { children: labelBody })), sortAsc === undefined ? null : (_jsx("span", Object.assign({ className: "schema-table__th__sort-icon" }, { children: sortAsc ? "↓" : "↑" })))] })), isSortable || columnFilterStatus !== EColumnFilterStatus.UNAVAILABLE ? (_jsx("button", Object.assign({ className: "schema-table__th__trigger-el", onClick: onTriggerClick }, { children: _jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#404040", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, { children: _jsx("polyline", { points: "6 9 12 15 18 9" }) })) }))) : null] })));
139
+ return (_jsxs("div", Object.assign({ style: style, className: classNames.join(" "), title: title, draggable: true, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop }, { children: [_jsxs("div", Object.assign({ className: "schema-table__th__label-body", style: { lineHeight: "44px" }, onClick: onLabelClick }, { children: [_jsx("span", Object.assign({ className: "schema-table__th__label-body-text" }, { children: labelBody })), sortAsc === undefined ? null : (_jsx("span", Object.assign({ className: "schema-table__th__sort-icon" }, { children: sortAsc ? "↓" : "↑" })))] })), isSortable || columnFilterStatus !== EColumnFilterStatus.UNAVAILABLE ? (_jsx("button", Object.assign({ className: "schema-table__th__trigger-el", onClick: onTriggerClick }, { children: _jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#404040", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, { children: _jsx("polyline", { points: "6 9 12 15 18 9" }) })) }))) : null] })));
140
140
  };
141
141
  export default React.memo(Th);
package/dist/index.css CHANGED
@@ -45,6 +45,7 @@
45
45
  align-items: center;
46
46
  }
47
47
  .schema-table__row_counter {
48
+ margin-left: 8px;
48
49
  font-size: 0.835rem;
49
50
  }
50
51
  .schema-table__column_resize_container {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mig-schema-table",
3
- "version": "3.0.120",
3
+ "version": "3.0.121",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/"