pixel-react 1.10.8 → 1.10.9

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.10.8",
4
+ "version": "1.10.9",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -33,7 +33,6 @@ const ArrowsButton = ({
33
33
  iconButtonSize={24}
34
34
  iconButtonBorderRadius={3}
35
35
  onOptionClick={() => {}}
36
- targetRef={menuOptionRef}
37
36
  treeRowRef={treeRowRef}
38
37
  />
39
38
  </span>
@@ -52,7 +52,7 @@ const calculatePosition = (
52
52
  left,
53
53
  right: window.innerWidth - (left + width),
54
54
  };
55
- const gap = 8; // Required gap
55
+ const gap = 0;
56
56
 
57
57
  switch (dropdownPlacement) {
58
58
  case 'top':
@@ -40,14 +40,16 @@ const SortableRow = ({
40
40
  transform: CSS.Transform.toString(transform),
41
41
  transition,
42
42
  };
43
+ const key = row._id || row.id;
43
44
  return (
44
45
  <tr
45
46
  ref={setNodeRef}
46
47
  style={style}
47
- key={row._id || row.id}
48
+ key={key}
48
49
  className={classNames(tableBodyRowClass, {
49
50
  'disabled-row': row.disabled,
50
51
  })}
52
+ id={key}
51
53
  >
52
54
  {columns.map((column: any, index: number) => {
53
55
  return (
@@ -140,6 +140,21 @@
140
140
  z-index: 2;
141
141
  }
142
142
 
143
+ .ff-table-tree-row:hover,
144
+ .ff-table-tree-row.hover {
145
+ background-color: var(--hover-color);
146
+
147
+ .ff-table-tree-td {
148
+ &:first-child {
149
+ background-color: var(--hover-color);
150
+ }
151
+ }
152
+
153
+ .table-tree-row-action {
154
+ display: inline-flex;
155
+ align-items: center;
156
+ }
157
+ }
143
158
  .ff-table-tree-row {
144
159
  background-color: var(--base-bg-color);
145
160
 
@@ -152,20 +167,6 @@
152
167
  z-index: 9999;
153
168
  align-items: center;
154
169
  }
155
- &:hover {
156
- background-color: var(--hover-color);
157
-
158
- .ff-table-tree-td {
159
- &:first-child {
160
- background-color: var(--hover-color);
161
- }
162
- }
163
-
164
- .table-tree-row-action {
165
- display: inline-flex;
166
- align-items: center;
167
- }
168
- }
169
170
 
170
171
  &::after {
171
172
  content: '';
@@ -1,10 +1,13 @@
1
1
  export const prepareData = (dataObj: any, columnObj: any) => {
2
2
  let cellData = dataObj[columnObj.accessor];
3
3
  if (columnObj.cell) {
4
+ const refId = dataObj._id || dataObj.id;
5
+
4
6
  return columnObj.cell({
5
7
  value: cellData,
6
8
  row: dataObj,
7
9
  column: columnObj.accessor,
10
+ ...(refId && { refId }),
8
11
  });
9
12
  } else if (columnObj.accessor) {
10
13
  return cellData;