This commit is contained in:
seb
2026-10-13 23:20:54 +02:00
parent e2bf08d340
commit f6cb3d3e35
3 changed files with 19 additions and 4 deletions

View File

@@ -474,6 +474,7 @@ export class OrderList extends PureComponent {
// getItems() returns current items or null and triggers loading of the first chunk
this.state = {
items: orderAutomat.getItems(),
unfilteredTotal: orderAutomat.state.unfilteredTotal ?? 0,
partiesById: {},
busyId: null,
};
@@ -490,9 +491,9 @@ export class OrderList extends PureComponent {
componentDidMount() {
this._cancelled = false;
// Subscribe to items only
this.unsub = orderAutomat.subscribe(this, (state) => ({
items: state.items,
unfilteredTotal: state.unfilteredTotal ?? 0,
}));
void this.loadParties();
}
@@ -582,7 +583,7 @@ export class OrderList extends PureComponent {
}
render() {
const { items, partiesById, busyId } = this.state;
const { items, unfilteredTotal, partiesById, busyId } = this.state;
rowContext.partiesById = partiesById;
rowContext.busyId = busyId;
@@ -616,6 +617,7 @@ export class OrderList extends PureComponent {
minHeight={0}
items={items || []}
totalCount={items ? items.length : 0}
unfilteredTotal={unfilteredTotal}
renderItem={OrderRow}
virtualScrollbar
header={