Skip to content

Commit

Permalink
fix: creating new payee with 'one of'-condition broken (#4099)
Browse files Browse the repository at this point in the history
* fix: creating new payee with 'one of'-condition broken

* change author and description of release note
  • Loading branch information
sveselinovic authored Jan 7, 2025
1 parent 1f44903 commit a5d591f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// @ts-strict-ignore
import 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';
Expand All @@ -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';
Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -738,6 +738,7 @@ type AutocompleteFooterProps = {
embedded?: boolean;
children: ReactNode;
};

export function AutocompleteFooter({
show = true,
embedded,
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/4099.md
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit a5d591f

Please sign in to comment.