Browse Source

Adjust the Selects empty option texts

master
meriadec 7 years ago
parent
commit
01a913aade
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 3
      src/components/SelectAccount/index.js
  2. 3
      src/components/SelectCurrency/index.js
  3. 4
      src/components/SelectExchange.js
  4. 2
      src/components/SettingsPage/sections/Display.js
  5. 4
      static/i18n/en/app.yml

3
src/components/SelectAccount/index.js

@ -69,6 +69,9 @@ const RawSelectAccount = ({ accounts, onChange, value, t, ...props }: Props) =>
renderValue={renderOption} renderValue={renderOption}
renderOption={renderOption} renderOption={renderOption}
placeholder={t('app:common.selectAccount')} placeholder={t('app:common.selectAccount')}
noOptionsMessage={({ inputValue }) =>
t('app:common.selectAccountNoOption', { accountName: inputValue })
}
onChange={onChange} onChange={onChange}
/> />
) )

3
src/components/SelectCurrency/index.js

@ -40,6 +40,9 @@ const SelectCurrency = ({ onChange, value, t, placeholder, currencies, ...props
renderValue={renderOption} renderValue={renderOption}
options={options} options={options}
placeholder={placeholder || t('app:common.selectCurrency')} placeholder={placeholder || t('app:common.selectCurrency')}
noOptionsMessage={({ inputValue }: { inputValue: string }) =>
t('app:common.selectCurrencyNoOption', { currencyName: inputValue })
}
onChange={item => onChange(item ? item.currency : null)} onChange={item => onChange(item ? item.currency : null)}
{...props} {...props}
/> />

4
src/components/SelectExchange.js

@ -93,6 +93,10 @@ class SelectExchange extends Component<
options={options} options={options}
onChange={onChange} onChange={onChange}
isLoading={options.length === 0} isLoading={options.length === 0}
placeholder={t('app:common.selectExchange')}
noOptionsMessage={({ inputValue }) =>
t('app:common.selectExchangeNoOption', { exchangeName: inputValue })
}
{...props} {...props}
/> />
) )

2
src/components/SettingsPage/sections/Display.js

@ -169,7 +169,7 @@ class TabProfile extends PureComponent<Props, State> {
to={counterValueCurrency} to={counterValueCurrency}
exchangeId={counterValueExchange} exchangeId={counterValueExchange}
onChange={this.handleChangeExchange} onChange={this.handleChangeExchange}
minWidth={150} minWidth={200}
/> />
</Box> </Box>
</Row> </Row>

4
static/i18n/en/app.yml

@ -11,7 +11,11 @@ common:
chooseWalletPlaceholder: Choose a wallet... chooseWalletPlaceholder: Choose a wallet...
currency: Currency currency: Currency
selectAccount: Select an account selectAccount: Select an account
selectAccountNoOption: 'No account matching "{{accountName}}"'
selectCurrency: Select a currency selectCurrency: Select a currency
selectCurrencyNoOption: 'No currency matching "{{currencyName}}"'
selectExchange: Select an exchange
selectExchangeNoOption: 'No exchange matching "{{exchangeName}}"'
sortBy: Sort by sortBy: Sort by
search: Search search: Search
save: Save save: Save

Loading…
Cancel
Save