fix(xo-web/select-objects): clearer placeholder for SelectProxy (#4843)

This commit is contained in:
Pierre Donias 2020-03-05 10:21:08 +01:00 committed by GitHub
parent 11e79914ef
commit 79adb7225e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -301,6 +301,7 @@ const messages = {
selectPools: 'Select pool(s)…',
selectRemotes: 'Select remote(s)…',
selectProxies: 'Select proxy(ies)…',
selectProxy: 'Select proxy…',
selectResourceSets: 'Select resource set(s)…',
selectResourceSetsVmTemplate: 'Select template(s)…',
selectResourceSetsSr: 'Select SR(s)…',

View File

@ -326,7 +326,10 @@ const makeStoreSelect = (createSelectors, defaultProps) =>
))
)
const makeSubscriptionSelect = (subscribe, props) =>
const makeSubscriptionSelect = (
subscribe,
{ placeholder, placeholderMulti = placeholder, ...props } = {}
) =>
uncontrollableInput(options)(
class extends React.PureComponent {
state = {}
@ -366,6 +369,7 @@ const makeSubscriptionSelect = (subscribe, props) =>
<GenericSelect
{...props}
{...this.props}
placeholder={this.props.multi ? placeholderMulti : placeholder}
xoObjects={this._getFilteredXoObjects()}
xoContainers={
this.state.xoContainers && this._getFilteredXoContainers()
@ -854,7 +858,7 @@ export const SelectProxy = makeSubscriptionSelect(
})),
})
}),
{ placeholder: _('selectProxies') }
{ placeholderMulti: _('selectProxies'), placeholder: _('selectProxy') }
)
// ===================================================================