A local-first personal finance app
Move saveScrollWidth call to layout effect (#1366)
Jed Foxc6e480e89c5a
diff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsxindex 3de76be66c..b4a63e2431 100644--- a/packages/desktop-client/src/components/table.tsx+++ b/packages/desktop-client/src/components/table.tsx@@ -1060,12 +1060,6 @@ export const Table = forwardRef<TableHandleRef, TableProps>(list.current?.setRowAnimation(true);listInitialized.current = true;}- });-- function renderRow({ index, style, key }) {- let item = items[index];- let editing = editingId === item.id;- let selected = isSelected && isSelected(item.id);if (scrollContainer.current && saveScrollWidth) {saveScrollWidth(@@ -1075,6 +1069,12 @@ export const Table = forwardRef<TableHandleRef, TableProps>(scrollContainer.current ? scrollContainer.current.clientWidth : 0,);}+ });++ function renderRow({ index, style, key }) {+ let item = items[index];+ let editing = editingId === item.id;+ let selected = isSelected && isSelected(item.id);let row = renderItem({item,diff --git a/upcoming-release-notes/1366.md b/upcoming-release-notes/1366.mdnew file mode 100644index 0000000000..88a4c9200a--- /dev/null+++ b/upcoming-release-notes/1366.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [j-f1]+---++Fix React warning in the console