@megha-ui/react 1.2.73 → 1.2.74

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.
@@ -144,8 +144,8 @@ const Grid = ({ columns, wrapperClass, updateGridColumns, data, height, sortable
144
144
  return acc;
145
145
  }, {});
146
146
  _columns = _columns.map((item) => {
147
- var _a;
148
- return (Object.assign(Object.assign({}, item), { dataType: (_a = columnData === null || columnData === void 0 ? void 0 : columnData[item.key]) !== null && _a !== void 0 ? _a : "string" }));
147
+ var _a, _b;
148
+ return (Object.assign(Object.assign({}, item), { dataType: (_b = (_a = item.dataType) !== null && _a !== void 0 ? _a : columnData === null || columnData === void 0 ? void 0 : columnData[item.key]) !== null && _b !== void 0 ? _b : "string" }));
149
149
  });
150
150
  }
151
151
  setGridColumns(_columns);
@@ -28,8 +28,9 @@ const formatValue = (value, type = "number", locale = "sv-SE", options = {
28
28
  const date = new Date(value);
29
29
  return formatDate(date, locale, options);
30
30
  }
31
- else if (type === "currency" && typeof value === "number") {
32
- return formatCurrency(value, locale, options.currency, options);
31
+ else if (type === "currency") {
32
+ const num = parseFloat(value.toString());
33
+ return formatCurrency(num, locale, options.currency, options);
33
34
  }
34
35
  else {
35
36
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.73",
3
+ "version": "1.2.74",
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.mjs",