fix(wpcarro/ynabsql): Filter and sort transactions onUpload

:)

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>
This commit is contained in:
William Carroll 2023-01-23 07:55:25 -08:00 committed by clbot
parent 206b797d00
commit 989111857a

View file

@ -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>
);