File tree 4 files changed +17
-0
lines changed
test-project-rsc-kitchen-sink/web/src/lib
packages/cli/src/commands/generate/scaffold
4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import humanize from 'humanize-string'
4
4
5
5
const MAX_STRING_LENGTH = 150
6
6
7
+ export const bigIntDisplay = ( value : bigint ) => {
8
+ return value . toString ( )
9
+ }
10
+
7
11
export const formatEnum = ( values : string | string [ ] | null | undefined ) => {
8
12
let output = ''
9
13
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import humanize from 'humanize-string'
4
4
5
5
const MAX_STRING_LENGTH = 150
6
6
7
+ export const bigIntDisplay = ( value : bigint ) => {
8
+ return value . toString ( )
9
+ }
10
+
7
11
export const formatEnum = ( values : string | string [ ] | null | undefined ) => {
8
12
let output = ''
9
13
Original file line number Diff line number Diff line change @@ -306,6 +306,11 @@ const modelRelatedVariables = (model) => {
306
306
listDisplayFunction : 'formatEnum' ,
307
307
displayFunction : 'formatEnum' ,
308
308
} ,
309
+ BigInt : {
310
+ componentName : 'TextField' ,
311
+ displayFunction : 'bigIntDisplay' ,
312
+ listDisplayFunction : 'truncate' ,
313
+ } ,
309
314
Boolean : {
310
315
componentName : 'CheckboxField' ,
311
316
defaultProp : 'defaultChecked' ,
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ import humanize from 'humanize-string'
4
4
5
5
const MAX_STRING_LENGTH = 150
6
6
7
+ export const bigIntDisplay = (value: bigint) => {
8
+ return value.toString()
9
+ }
10
+
7
11
export const formatEnum = (values: string | string[] | null | undefined) => {
8
12
let output = ''
9
13
You can’t perform that action at this time.
0 commit comments