Skip to content

Commit 580213f

Browse files
committed
reset pagination offset when filter is toggled
1 parent 8f9c257 commit 580213f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/vendor/docsearch.bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
function toggleFilter (e) {
115115
if ('restoring' in this.dropdown) return
116116
window.localStorage.setItem(SEARCH_FILTER_ACTIVE_KEY, e.target.checked)
117-
isClosed(this) ? this.$input.focus() : requery.call(this)
117+
isClosed(this) ? this.$input.focus() : (this.dropdown.datasets[0].page = 0) || requery.call(this)
118118
}
119119

120120
function confineEvent (e) {

0 commit comments

Comments
 (0)