@transferwise/components 0.0.0-experimental-ac57725 → 0.0.0-experimental-82772cf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8029,20 +8029,20 @@ class MoneyInput extends Component {
8029
8029
  maxLengthOverride
8030
8030
  } = this.props;
8031
8031
  const selectOptions = this.getSelectOptions();
8032
- const firstOptionValue = () => {
8032
+ const getFirstOption = () => {
8033
8033
  if (selectOptions.length !== 0) {
8034
8034
  const firstOption = selectOptions[0];
8035
8035
  if (firstOption.type === 'option') {
8036
- return firstOption.value.value;
8036
+ return firstOption.value;
8037
8037
  }
8038
8038
  if (firstOption.type === 'group' && firstOption.options.length !== 0) {
8039
- return firstOption.options[0].value.value;
8039
+ return firstOption.options[0].value;
8040
8040
  }
8041
8041
  }
8042
8042
  return null;
8043
8043
  };
8044
- const firstOption = firstOptionValue();
8045
- const isFixedCurrency = selectOptions.length === 1 && firstOption === selectedCurrency.currency || !onCurrencyChange;
8044
+ const firstOption = getFirstOption();
8045
+ const isFixedCurrency = !this.state.searchQuery && (selectOptions.length === 1 && firstOption.currency === selectedCurrency.currency || !onCurrencyChange);
8046
8046
  const disabled = !this.props.onAmountChange;
8047
8047
  return /*#__PURE__*/jsxs("div", {
8048
8048
  className: classNames(this.style('tw-money-input'), this.style('input-group'), this.style(`input-group-${size}`)),
@@ -8081,6 +8081,7 @@ class MoneyInput extends Component {
8081
8081
  children: /*#__PURE__*/jsx(SelectInput, {
8082
8082
  items: selectOptions,
8083
8083
  value: this.state.selectedOption,
8084
+ compareValues: "currency",
8084
8085
  renderValue: (currency, withinTrigger) => {
8085
8086
  return /*#__PURE__*/jsx(SelectInputOptionContent, {
8086
8087
  title: currency.label,