Skip to content

Commit

Permalink
fix(ui): bigint are truncated on topic data
Browse files Browse the repository at this point in the history
close #809
  • Loading branch information
tchiotludo committed Oct 24, 2021
1 parent 78a71a6 commit b8e6667
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
13 changes: 13 additions & 0 deletions client/package-lock.json

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

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"css-loader": "^3.4.1",
"font-awesome": "^4.7.0",
"joi-validation": "^2.0.0",
"json-bigint": "^1.0.0",
"lodash": "^4.17.21",
"moment": "^2.24.0",
"node-sass": "^4.14.1",
Expand Down
5 changes: 3 additions & 2 deletions client/src/containers/Topic/Topic/TopicData/TopicData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Root from '../../../../components/Root';
import {capitalizeTxt, getClusterUIOptions} from '../../../../utils/functions';
import Select from '../../../../components/Form/Select';
import TimeAgo from 'react-timeago'
import JSONbig from 'json-bigint';

class TopicData extends Root {
state = {
Expand Down Expand Up @@ -846,8 +847,8 @@ class TopicData extends Root {
extraRowContent: (obj, index) => {
let value = obj.value;
try {
let json = JSON.parse(obj.value);
value = JSON.stringify(json, null, 2);
let json = JSONbig.parse(obj.value);
value = JSONbig.stringify(json, null, 2);
// eslint-disable-next-line no-empty
} catch (e) {}

Expand Down

0 comments on commit b8e6667

Please sign in to comment.