Skip to content

Commit d0779c7

Browse files
authored
Fix display 0 on DisplayLookup (#274)
1 parent 1964143 commit d0779c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/npm-fastui/src/components/details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const FieldDetail: FC<{ props: Details; fieldDisplay: DisplayLookupProps }> = ({
2323
<>
2424
<dt className={useClassName(props, { el: 'dt' })}>{title ?? asTitle(field)}</dt>
2525
<dd className={useClassName(props, { el: 'dd' })}>
26-
<DisplayComp type="Display" onClick={renderedOnClick} value={value || null} {...rest} />
26+
<DisplayComp type="Display" onClick={renderedOnClick} value={value !== undefined ? value : null} {...rest} />
2727
</dd>
2828
</>
2929
)

src/npm-fastui/src/components/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const Cell: FC<{ row: DataModel; column: DisplayLookupProps }> = ({ row, column
4444
const renderedOnClick = renderEvent(onClick, row)
4545
return (
4646
<td>
47-
<DisplayComp type="Display" onClick={renderedOnClick} value={value || null} {...rest} />
47+
<DisplayComp type="Display" onClick={renderedOnClick} value={value !== undefined ? value : null} {...rest} />
4848
</td>
4949
)
5050
}

0 commit comments

Comments
 (0)