@campxdev/shared 2.0.5 → 2.0.6

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -217,7 +217,11 @@ export default function Table<T>({
217
217
  sx={sx}
218
218
  >
219
219
  {col?.dataType && col?.dataType == 'currency' ? (
220
- <>{convertToAmount(row[col.dataIndex])}</>
220
+ <>
221
+ {convertToAmount(
222
+ row[col.dataIndex] ? row[col.dataIndex] : 0,
223
+ )}
224
+ </>
221
225
  ) : (
222
226
  <>
223
227
  {col?.render
@@ -245,7 +249,13 @@ export default function Table<T>({
245
249
  >
246
250
  {totalCols.includes(colIndex + 1) ? (
247
251
  col?.dataType && col?.dataType == 'currency' ? (
248
- <>{convertToAmount(totalCount[colIndex])}</>
252
+ <>
253
+ {convertToAmount(
254
+ totalCount[colIndex]
255
+ ? totalCount[colIndex]
256
+ : 0,
257
+ )}
258
+ </>
249
259
  ) : (
250
260
  <>{totalCount[colIndex]}</>
251
261
  )