How to pass get the number of hits in middleware onStageChange
?
#6636
Unanswered
garyhuangdev
asked this question in
Q&A
Replies: 1 comment 4 replies
-
When you do the filter event, do you want the number of hits after the filter is completed? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
How can I get the number of hits in the middleware
onStageChange
function?What I try to do:
When filter state changes, dispatch a custom event from document object, the event data should include nbHits.
I am using InstantSearch v7. I use middleware to hook into the filter state update process by using
onStateChange
. But it seems I am unable to access thenbHits
and send it via theonStateChange
.Is it possible to get
nbHits
in the implementation of middlewareFn?Beta Was this translation helpful? Give feedback.
All reactions