@megha-ui/react 1.3.105 → 1.3.107

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.
@@ -404,7 +404,6 @@ withCard = false, cardClassName, cardHeader, title, headerLeft, headerRight, sub
404
404
  const _groupedKeys = groupedKeys.length > 0
405
405
  ? groupedKeys
406
406
  : [{ groupedKey: "", groupedValue: columnKey }];
407
- console.log("Using grouped keys:", _groupedKeys);
408
407
  _groupedKeys.forEach((grouped) => {
409
408
  const { groupedKey, groupedValue } = grouped;
410
409
  const filterValue = _groupedKeys.length > 1 ? groupedValue : "";
@@ -694,16 +694,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
694
694
  }, onChange: (e) => {
695
695
  var _a, _b;
696
696
  const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
697
- const input = e.target.value;
698
- const searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
699
- defaultSearchOperation ||
700
- "contains";
701
- onSearch(currentKey, input, searchType);
702
- }, onBlur: (e) => {
703
- var _a, _b;
704
- const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
705
- const raw = e.target.value;
706
- const input = raw.replace(/\?/g, "%");
697
+ const input = e.target.value.replace(/\?/g, "%");
707
698
  let searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
708
699
  defaultSearchOperation ||
709
700
  "contains";
@@ -724,8 +715,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
724
715
  else if (!startsWithPercent && endsWithPercent) {
725
716
  searchType = "startsWith";
726
717
  }
727
- else if (startsWithPercent &&
728
- !endsWithPercent) {
718
+ else if (startsWithPercent && !endsWithPercent) {
729
719
  searchType = "endsWith";
730
720
  }
731
721
  }
@@ -837,13 +827,6 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
837
827
  : (column === null || column === void 0 ? void 0 : column.dataType) === "date"
838
828
  ? dateTypeSearch.includes(item.value)
839
829
  : textTypeSearch.includes(item.value));
840
- console.log(colSearchOptions.find((item) => {
841
- var _a, _b;
842
- return item.value ===
843
- (((_b = searchQueries[(_a = column === null || column === void 0 ? void 0 : column.key) !== null && _a !== void 0 ? _a : ""]) === null || _b === void 0 ? void 0 : _b.type) ||
844
- defaultSearchOperation ||
845
- "contains");
846
- }));
847
830
  return (_jsx("div", { className: `${sortable && column.sortable ? "sortable" : ""} ${column.showMenu ? "menu-true" : "menu-false"} column index-${column.key}`, style: Object.assign(Object.assign({}, cellStyle), { padding: "0.5rem", textAlign: "left", whiteSpace: "nowrap", textOverflow: "ellipsis", wordBreak: widthMode === "auto" ? "break-all" : "unset", backgroundColor: "var(--row-header-bg)", borderTop: headerTopBorder, borderBottom: headerBottomBorder, flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, position: "sticky", top: 0, zIndex: 1 }), onMouseMove: (e) => handleMouseMove(e), onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: !actionsKey.split(",").includes(column.key) && (_jsxs(_Fragment, { children: [resizable && (_jsx("div", { style: {
848
831
  position: "absolute",
849
832
  width: "1px",
@@ -1115,15 +1098,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
1115
1098
  alignItems: "center",
1116
1099
  }, children: [_jsx(TextInput, { onFocus: () => setActiveSearchColumn(column.key), onChange: (e) => {
1117
1100
  var _a;
1118
- const input = e.target.value;
1119
- const searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) ||
1120
- defaultSearchOperation ||
1121
- "contains";
1122
- onSearch(column.key, input, searchType);
1123
- }, onBlur: (e) => {
1124
- var _a;
1125
- const raw = e.target.value;
1126
- const input = raw.replace(/\?/g, "%");
1101
+ const input = e.target.value.replace(/\?/g, "%");
1127
1102
  let searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) ||
1128
1103
  defaultSearchOperation ||
1129
1104
  "contains";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.3.105",
3
+ "version": "1.3.107",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",