Currently, pressing the refresh button in the query action bar will refresh the count in the message "Query returned X documents". However, pressing the refresh button will not update the top right collection stats.
This is problematic since the user can see two conflicting numbers concerning the total document count in a collection. Let's say there are 5 documents in the collection view. A user adds 5 more documents and presses refresh. They will see:
- "Query returned 10 documents" in the query action bar and
- Documents 5 in the top right collection stats
We should change the query bar refresh button to also update aggregate collection stats. This can be done by having the collection-stats store listen to the refreshDocuments action in Crud plugin. Very similar to how it currently listens to documentRemoved action.
Acceptance criteria:
- listen to refreshDocuments action in collection stats store and call loadCollectionStats
- add unit tests to show that appropriate calls are being made
- is duplicated by
-
COMPASS-4641 Refresh buttons don't refresh the Documents count in collection header
- Closed
- is related to
-
COMPASS-6678 Refresh buttons don't refresh the number of DOCUMENTS
- Open