about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2023-01-23T15·55-0800
committerclbot <clbot@tvl.fyi>2023-01-23T16·00+0000
commit989111857a338b1c66f5c5443c324d7151faa319 (patch)
tree8a85746b2cf19d922a3282fb6deb6eddaeec6f95
parent206b797d00b9da845d4b003b7c17e1d039b7909d (diff)
fix(wpcarro/ynabsql): Filter and sort transactions onUpload r/5744
:)

Change-Id: I8ae1dfb16885f2aa2d3416fadaf860bbe4e196fc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7915
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
-rw-r--r--users/wpcarro/ynabsql/dataviz/components.jsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/users/wpcarro/ynabsql/dataviz/components.jsx b/users/wpcarro/ynabsql/dataviz/components.jsx
index a9c8e544b5a2..191c83743475 100644
--- a/users/wpcarro/ynabsql/dataviz/components.jsx
+++ b/users/wpcarro/ynabsql/dataviz/components.jsx
@@ -863,7 +863,14 @@ class App extends React.Component {
                         <li><a href="#" onClick={() => this.setState({ sensitive: !this.state.sensitive })}>sensitive</a></li>
                     </ul>
                 </nav>
-                <UploadJSON onUpload={xs => this.setState({ allTnransactions: xs })} />
+                <UploadJSON onUpload={xs => this.setState({
+                    allTransactions: xs,
+                    filteredTransactions: select(this.state.query, xs, {
+                        caseSensitive: this.state.slxCaseSensitive,
+                        preferRegex: this.state.slxPreferRegex,
+                        slxDateKey: this.state.slxDateKey,
+                    }).sort(compileSort(this.state.sortExpr))
+                })} />
                 {view}
             </div>
         );