A local-first personal finance app
fix: creating new payee with 'one of'-condition broken (#4099)
sveselinovica5d591fed7e5
diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsxindex ff8bc36c3a..d7b4edcef3 100644--- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx+++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx@@ -1,14 +1,14 @@// @ts-strict-ignoreimport React, {- useState,- useRef,- useEffect,- useMemo,+ type ChangeEvent,type ComponentProps,type HTMLProps,- type ReactNode,type KeyboardEvent,- type ChangeEvent,+ type ReactNode,+ useEffect,+ useMemo,+ useRef,+ useState,} from 'react';import { css, cx } from '@emotion/css';@@ -17,7 +17,7 @@ import Downshift, { type StateChangeTypes } from 'downshift';import { getNormalisedString } from 'loot-core/src/shared/normalisation';import { SvgRemove } from '../../icons/v2';-import { theme, styles } from '../../style';+import { styles, theme } from '../../style';import { Button } from '../common/Button';import { Input } from '../common/Input';import { Popover } from '../common/Popover';@@ -649,10 +649,10 @@ function MultiAutocomplete<T extends Item>({onSelect(items);}- function onAddItem(id: T['id']) {+ function onAddItem(id: T['id'], value: string) {if (id) {id = id.trim();- onSelect([...selectedItemIds, id], id);+ onSelect([...selectedItemIds, id], value);}}@@ -738,6 +738,7 @@ type AutocompleteFooterProps = {embedded?: boolean;children: ReactNode;};+export function AutocompleteFooter({show = true,embedded,diff --git a/upcoming-release-notes/4099.md b/upcoming-release-notes/4099.mdnew file mode 100644index 0000000000..0c8e684ea1--- /dev/null+++ b/upcoming-release-notes/4099.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [sveselinovic]+---++Fix resulting wrong name when creating a new payee in rule with the condition set to "one of"