Skip to content

Commit be38178

Browse files
Merge pull request #435 from AdamWillford/react
Add displayName to Tenant Selector for search
2 parents 184309f + 76918b5 commit be38178

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/components/cipp/TenantSelector.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { useDispatch, useSelector } from 'react-redux'
66
import PropTypes from 'prop-types'
77
import { useListTenantsQuery } from '../../store/api/tenants'
88
import { setCurrentTenant } from '../../store/features/app'
9+
import { faUser, faCog, faBars, faArrowUp } from '@fortawesome/free-solid-svg-icons'
10+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
911

1012
const TenantSelector = (props) => {
1113
const { action } = props
@@ -37,10 +39,10 @@ const TenantSelector = (props) => {
3739
onChange={activated}
3840
filterOptions={fuzzySearch}
3941
placeholder={placeholder}
40-
value={currentTenant && currentTenant.customerId}
41-
options={tenants.map(({ customerId, defaultDomainName }) => ({
42+
value={currentTenant && currentTenant.customerId && currentTenant.displayName}
43+
options={tenants.map(({ customerId, displayName, defaultDomainName }) => ({
4244
value: customerId,
43-
name: defaultDomainName,
45+
name: [displayName] + [` (${defaultDomainName})`],
4446
}))}
4547
/>
4648
)

0 commit comments

Comments
 (0)