Skip to content

Commit

Permalink
Records list: show "---" when owner is empty (#3701)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Ricci <[email protected]>
  • Loading branch information
SteRiccio and SteRiccio authored Dec 25, 2024
1 parent 30f131c commit a686ce9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/views/App/views/Data/Records/RecordOwnerColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React, { useCallback } from 'react'
import { useDispatch } from 'react-redux'
import PropTypes from 'prop-types'

import { Strings } from '@openforis/arena-core'

import * as Record from '@core/record/record'
import * as User from '@core/user/user'

Expand Down Expand Up @@ -58,7 +60,7 @@ export const RecordOwnerColumn = (props) => {
canEdit={canEdit}
className="record-owner-col"
item={record}
renderItem={({ item }) => Record.getOwnerName(item)}
renderItem={({ item }) => Strings.defaultIfEmpty('---')(Record.getOwnerName(item))}
renderItemEditing={() => <RecordOwnerDropdown selectedUuid={ownerUuid} onChange={onChange} />}
/>
)
Expand Down

0 comments on commit a686ce9

Please sign in to comment.