Skip to content

Commit

Permalink
Fix display 0 on DisplayLookup (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Apr 19, 2024
1 parent 1964143 commit d0779c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/npm-fastui/src/components/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const FieldDetail: FC<{ props: Details; fieldDisplay: DisplayLookupProps }> = ({
<>
<dt className={useClassName(props, { el: 'dt' })}>{title ?? asTitle(field)}</dt>
<dd className={useClassName(props, { el: 'dd' })}>
<DisplayComp type="Display" onClick={renderedOnClick} value={value || null} {...rest} />
<DisplayComp type="Display" onClick={renderedOnClick} value={value !== undefined ? value : null} {...rest} />
</dd>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion src/npm-fastui/src/components/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Cell: FC<{ row: DataModel; column: DisplayLookupProps }> = ({ row, column
const renderedOnClick = renderEvent(onClick, row)
return (
<td>
<DisplayComp type="Display" onClick={renderedOnClick} value={value || null} {...rest} />
<DisplayComp type="Display" onClick={renderedOnClick} value={value !== undefined ? value : null} {...rest} />
</td>
)
}

0 comments on commit d0779c7

Please sign in to comment.