fix split transaction button on desktop (#6269)

* fix split transaction button on desktop

* note
This commit is contained in:
Matt Fiddaman
2025-11-29 21:58:09 +00:00
committed by GitHub
parent 33610fee78
commit f3799ba9f0
2 changed files with 21 additions and 7 deletions

View File

@@ -136,12 +136,20 @@ function CategoryList({
}}
>
{splitTransaction &&
renderSplitTransactionButton({
key: 'split',
...(getItemProps ? getItemProps({ item: splitTransaction }) : {}),
highlighted: splitTransaction.highlightedIndex === highlightedIndex,
embedded,
})}
(() => {
const splitButtonProps = getItemProps
? getItemProps({ item: splitTransaction })
: {};
const { onClick, ...restSplitButtonProps } = splitButtonProps;
return renderSplitTransactionButton({
key: 'split',
...restSplitButtonProps,
onClick,
highlighted:
splitTransaction.highlightedIndex === highlightedIndex,
embedded,
});
})()}
{groupedCategories.map(({ group, categories }) => {
if (!group) {
return null;
@@ -334,7 +342,7 @@ function defaultRenderCategoryItemGroupHeader(
return <ItemHeader {...props} type="category" />;
}
type SplitTransactionButtonProps = {
type SplitTransactionButtonProps = ComponentPropsWithoutRef<typeof View> & {
Icon?: ComponentType<SVGProps<SVGElement>>;
highlighted?: boolean;
embedded?: boolean;

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [matt-fidd]
---
Fix split transaction button on desktop