Skip to content

Commit

Permalink
support big int in data inspector
Browse files Browse the repository at this point in the history
Reviewed By: antonk52

Differential Revision: D57780901

fbshipit-source-id: 5d66b0dcc47531d3cf0eae91f167f533c9cd7734
  • Loading branch information
Luke De Feo authored and facebook-github-bot committed May 28, 2024
1 parent 4f85322 commit 8b946d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ const defaultValueExtractor: DataValueExtractor = (value: any) => {
return {mutable: true, type: 'number', value};
}

if (type === 'bigint') {
return {mutable: true, type: 'bigint', value};
}

if (type === 'string') {
return {mutable: true, type: 'string', value};
}
Expand Down
3 changes: 3 additions & 0 deletions desktop/flipper-plugin/src/ui/data-inspector/DataPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export default class DataPreview extends PureComponent<{
case 'number':
propValueElement = <NumberValue>{`${propValue}`}</NumberValue>;
break;
case 'bigint':
propValueElement = <NumberValue>{`${propValue}`}</NumberValue>;
break;
case 'string':
if (propValue.length <= 20) {
propValueElement = <StringValue>{propValue}</StringValue>;
Expand Down

0 comments on commit 8b946d4

Please sign in to comment.