Skip to content

Commit

Permalink
Merge pull request #197 from nzzdev/release-7.2.5
Browse files Browse the repository at this point in the history
Release 7.2.5
  • Loading branch information
fgervasi authored Mar 28, 2023
2 parents 7ea2cfe + 22a9e2b commit 362015c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
9 changes: 9 additions & 0 deletions dist/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ function formatCell(rawValue, type, useGroupingSeparator = false) {
return formatCountryFlagEmojiDatapoint(rawValue);
}
const parsedRawValue = parseFloat(rawValue || '');
if (isNaN(parsedRawValue)) {
return {
type: 'text',
value: parsedRawValue,
label: '',
footnote: '',
classes: [''],
};
}
let prefix = '';
let separator = '';
if (useGroupingSeparator) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "q-table",
"version": "7.2.4",
"version": "7.2.5",
"description": "",
"main": "index.js",
"type": "module",
Expand Down
9 changes: 9 additions & 0 deletions src/helpers/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ function formatCell(rawValue: QTableCellDataRaw, type: FormattingType, useGroupi
}

const parsedRawValue = parseFloat(rawValue || '');
if(isNaN(parsedRawValue)) {
return {
type: 'text',
value: parsedRawValue,
label: '',
footnote: '',
classes: [''],
}
}

let prefix = '';

Expand Down

0 comments on commit 362015c

Please sign in to comment.