Skip to content

A local-first personal finance app

Disable interactivity on preview status icons (#2924)

Julian Dominguez-Schatz0ee91268205f
diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx
index f0880f907d..f06f4af9e3 100644
--- a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx
+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx
@@ -342,6 +342,7 @@ function StatusCell({
selected,
status,
isChild,
+ isPreview,
onEdit,
onUpdate,
}) {
@@ -384,12 +385,19 @@ function StatusCell({
border: '1px solid transparent',
borderRadius: 50,
':focus': {
- border: '1px solid ' + theme.formInputBorderSelected,
- boxShadow: '0 1px 2px ' + theme.formInputBorderSelected,
+ ...(isPreview
+ ? {
+ boxShadow: 'none',
+ }
+ : {
+ border: '1px solid ' + theme.formInputBorderSelected,
+ boxShadow: '0 1px 2px ' + theme.formInputBorderSelected,
+ }),
},
cursor: isClearedField ? 'pointer' : 'default',
...(isChild && { visibility: 'hidden' }),
}}
+ disabled={isPreview || isChild}
onEdit={() => onEdit(id, 'cleared')}
onSelect={onSelect}
>
@@ -1965,7 +1973,7 @@ export const TransactionTable = forwardRef((props, ref) => {
);
if (isPreviewId(item.id)) {
- fields = ['select', 'cleared'];
+ fields = ['select'];
}
if (isTemporaryId(item.id)) {
// You can't focus the select/delete button of temporary
diff --git a/upcoming-release-notes/2924.md b/upcoming-release-notes/2924.md
new file mode 100644
index 0000000000..0c0af51dea
--- /dev/null
+++ b/upcoming-release-notes/2924.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [jfdoming]
+---
+
+Disable interactivity on preview status icons