Skip to content

Commit bbfcc62

Browse files
author
Carsten König
committed
reset search table sort when changing index
1 parent 4c68dd6 commit bbfcc62

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* fix table column size regression introduced in `1.0.9`, fixes [#245](https://github.com/cars10/elasticvue/issues/245)
66
* fix filtering when `null` values are present, fixes [#244](https://github.com/cars10/elasticvue/issues/244)
7+
* reset search table sort when changing index
78

89
## 1.0.9
910

src/composables/components/search/SearchDocuments.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ export const useSearchDocuments = () => {
4848
}
4949
}
5050

51+
watch(() => (searchStore.indices), () => {
52+
searchStore.pagination.sortBy = ''
53+
mergeQuery({sort: []})
54+
})
55+
5156
watch(() => (searchStore.q), value => {
5257
mergeQuery({ query: { query_string: { query: value } } })
5358
})

0 commit comments

Comments
 (0)