@megha-ui/react 1.3.47 → 1.3.49
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/components/dropdown/index.js +8 -4
- package/dist/components/grid/hooks/useBulkSelect.js +0 -1
- package/dist/components/grid/index.js +0 -1
- package/dist/components/grid/utils/newGroupedGridDetails.js +0 -1
- package/dist/components/grid/utils/newSummariseDetails.js +1 -1
- package/package.json +1 -1
|
@@ -84,8 +84,14 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
84
84
|
rect.bottom -
|
|
85
85
|
viewportPadding -
|
|
86
86
|
menuGap -
|
|
87
|
-
searchHeight -
|
|
88
|
-
|
|
87
|
+
searchHeight -
|
|
88
|
+
applyBtnHeight;
|
|
89
|
+
const rawSpaceAbove = rect.top -
|
|
90
|
+
containerTop -
|
|
91
|
+
viewportPadding -
|
|
92
|
+
menuGap -
|
|
93
|
+
searchHeight -
|
|
94
|
+
applyBtnHeight;
|
|
89
95
|
const spaceBelow = Math.max(0, Math.floor(rawSpaceBelow));
|
|
90
96
|
const spaceAbove = Math.max(0, Math.floor(rawSpaceAbove));
|
|
91
97
|
const opensUpwards = typeof clickStyle.bottom !== "undefined";
|
|
@@ -195,10 +201,8 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
195
201
|
bValue.toString().includes("-")) {
|
|
196
202
|
aValue = aValue.toString().split("-")[0];
|
|
197
203
|
bValue = bValue.toString().split("-")[0];
|
|
198
|
-
console.log(isNaN(parseFloat(aValue)), isNaN(parseFloat(bValue)));
|
|
199
204
|
aValue = isNaN(parseFloat(aValue)) ? aValue : parseFloat(aValue);
|
|
200
205
|
bValue = isNaN(parseFloat(bValue)) ? bValue : parseFloat(bValue);
|
|
201
|
-
console.log({ aValue, bValue });
|
|
202
206
|
}
|
|
203
207
|
else {
|
|
204
208
|
aValue = isNaN(parseFloat(aValue)) ? aValue : parseFloat(aValue);
|
|
@@ -17,7 +17,6 @@ export const useBulkSelect = ({ data, selectedRows, setSelectedRows, idKey, }) =
|
|
|
17
17
|
setSelectedRows &&
|
|
18
18
|
setSelectedRows((prevSelectedRows) => {
|
|
19
19
|
const newSelectedRows = new Set(prevSelectedRows);
|
|
20
|
-
console.log(visibleData.map((item) => item === null || item === void 0 ? void 0 : item[idKey]));
|
|
21
20
|
if (allSelected) {
|
|
22
21
|
visibleData.forEach((item) => { var _a; return newSelectedRows.delete((_a = item === null || item === void 0 ? void 0 : item[idKey].value) === null || _a === void 0 ? void 0 : _a.toString()); });
|
|
23
22
|
}
|
|
@@ -1100,7 +1100,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
|
|
|
1100
1100
|
setDraggingIndex(null);
|
|
1101
1101
|
}
|
|
1102
1102
|
else {
|
|
1103
|
-
console.log({ data });
|
|
1104
1103
|
const updatedItems = [...data];
|
|
1105
1104
|
const [draggedItem] = updatedItems.splice(draggingIndex, 1);
|
|
1106
1105
|
updatedItems.splice(dropIndex, 0, draggedItem);
|
|
@@ -33,7 +33,6 @@ const GroupedGrid = ({ groupedData, rowOpened, startIndex, endIndex, alternateRo
|
|
|
33
33
|
.join(">"));
|
|
34
34
|
}),
|
|
35
35
|
]);
|
|
36
|
-
console.log({ groupedData });
|
|
37
36
|
return (_jsx(_Fragment, { children: groupedData
|
|
38
37
|
.filter((item) => {
|
|
39
38
|
return item.type === "main" && item.level === 1
|
|
@@ -163,7 +163,7 @@ const NewSummariseDetails = ({ columns, rowIndex, groupBy, sortable, cellStyle,
|
|
|
163
163
|
? `${groupedData}>>${column.key}`
|
|
164
164
|
: column.key;
|
|
165
165
|
if (!column.hidden) {
|
|
166
|
-
return (_jsxs("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} ${`column-${column.key}`} ${columnKey}-${(_a = summariseDetails[columnKey]) === null || _a === void 0 ? void 0 : _a.type}`, style: Object.assign(Object.assign({}, cellStyle), { position: "relative", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, background: "var(--row-header-bg)" }), children: [summariseDetails[columnKey] &&
|
|
166
|
+
return (_jsxs("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} ${`column-${column.key}`} ${columnKey}-${(_a = summariseDetails[columnKey]) === null || _a === void 0 ? void 0 : _a.type}`, style: Object.assign(Object.assign(Object.assign(Object.assign({}, cellStyle), { position: groupBy !== "" ? "relative" : "sticky" }), (groupBy !== "" ? {} : { top: 0 })), { padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, background: "var(--row-header-bg)" }), children: [summariseDetails[columnKey] &&
|
|
167
167
|
summariseDetails[columnKey].type ? (_jsxs("div", { style: {
|
|
168
168
|
display: "flex",
|
|
169
169
|
alignItems: "center",
|
package/package.json
CHANGED