@megha-ui/react 1.2.638 → 1.2.639
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.
|
@@ -102,11 +102,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
102
102
|
setSearchOpsPosition({ top, left });
|
|
103
103
|
toggleDropdown(columnKey);
|
|
104
104
|
};
|
|
105
|
-
const menuOptions = [
|
|
106
|
-
// { label: "Sort Ascending", action: onSort, order: "asc" },
|
|
107
|
-
// { label: "Sort Descending", action: onSort, order: "dsc" },
|
|
108
|
-
{ label: "Group by", groupBy: setGroupBy },
|
|
109
|
-
];
|
|
105
|
+
const menuOptions = [{ label: "Group by", groupBy: setGroupBy }];
|
|
110
106
|
const searchOptions = [
|
|
111
107
|
{ label: "Contains", value: "contains", action: handleSearchOptionSelect },
|
|
112
108
|
{
|
|
@@ -235,7 +231,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
235
231
|
position: "sticky",
|
|
236
232
|
top: 0,
|
|
237
233
|
zIndex: 1,
|
|
238
|
-
fontWeight: 500
|
|
234
|
+
fontWeight: 500,
|
|
239
235
|
}, id: "header", children: [bulkSelect && (_jsx("div", { style: Object.assign(Object.assign({}, cellStyle), { textTransform: "uppercase", padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis" }), children: _jsx(Checkbox, { selected: allRowsSelected, onChange: () => toggleSelectAll(), noLabel: true, wrapperClass: checkboxWrapper }) })), groupByKeys.map((_groupBy) => {
|
|
240
236
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62;
|
|
241
237
|
return (_jsx(_Fragment, { children: headerColumns.find((column) => column.key === _groupBy) && (_jsxs("div", { className: `${sortable &&
|
|
@@ -572,7 +568,9 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
572
568
|
? numberTypeSearch.includes(item.value)
|
|
573
569
|
: column.dataType === "date"
|
|
574
570
|
? dateTypeSearch.includes(item.value)
|
|
575
|
-
: textTypeSearch.includes(item.value)), position: searchOpsPosition || { top: 0, left: 0 }, columnKey: column.key, columnData: columnData, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions
|
|
571
|
+
: textTypeSearch.includes(item.value)), position: searchOpsPosition || { top: 0, left: 0 }, columnKey: column.key, columnData: columnData, sortingOps: _jsx(GridHeaderDropdown, { options: menuOptions.filter((item) => item.label === "Group by"
|
|
572
|
+
? !column.isArrayString
|
|
573
|
+
: true), onClose: () => setDropdownVisible(null), column: column }), searchElement: _jsx("div", { id: "search-input", children: column.dataType === "date" ? (((_c = searchQueries[column.key]) === null || _c === void 0 ? void 0 : _c.type) ===
|
|
576
574
|
"between" ? (_jsxs(_Fragment, { children: [_jsx(DateInput, { value: (_d = searchQueries[column.key]) === null || _d === void 0 ? void 0 : _d.text.split("to")[0], placeholder: `From date`, onChange: (value) => {
|
|
577
575
|
var _a, _b;
|
|
578
576
|
return onSearch(column.key, (_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.text.split("to").map((item, index) => {
|
package/package.json
CHANGED