u
This commit is contained in:
@@ -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={
|
||||
|
||||
Reference in New Issue
Block a user