lecom-ui 5.4.13 → 5.4.14

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.
@@ -119,6 +119,31 @@ function DataTable({
119
119
  cellElem.style.backgroundColor = "#ffffff";
120
120
  }
121
121
  });
122
+ const allRows = document.querySelectorAll("table#data-table tbody tr");
123
+ allRows.forEach((row) => {
124
+ const rowElem = row;
125
+ rowElem.addEventListener("mouseenter", () => {
126
+ const cells = rowElem.querySelectorAll("td");
127
+ cells.forEach((cell) => {
128
+ const cellElem = cell;
129
+ const hasTruncate = cellElem.style.overflow === "hidden" && cellElem.style.textOverflow === "ellipsis";
130
+ if (hasTruncate || cellElem.hasAttribute("data-fixed")) {
131
+ cellElem.style.backgroundColor = "#f3f4f6";
132
+ }
133
+ });
134
+ });
135
+ rowElem.addEventListener("mouseleave", () => {
136
+ const cells = rowElem.querySelectorAll("td");
137
+ cells.forEach((cell) => {
138
+ const cellElem = cell;
139
+ const hasTruncate = cellElem.style.overflow === "hidden" && cellElem.style.textOverflow === "ellipsis";
140
+ const isTh = cellElem.tagName === "TH";
141
+ if (hasTruncate || cellElem.hasAttribute("data-fixed")) {
142
+ cellElem.style.backgroundColor = isTh ? "#f9fafb" : "#ffffff";
143
+ }
144
+ });
145
+ });
146
+ });
122
147
  }
123
148
  }, [isLoading, sorting]);
124
149
  const throttle = React.useCallback(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "5.4.13",
3
+ "version": "5.4.14",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",