fix: after reset filter records per page not getting reflected (#2912)

- After reset filter in full sql mode if limit applied, changing rows
per page not getting reflected
This commit is contained in:
Bhargav
2024-03-08 16:56:47 +05:30
committed by GitHub
parent a9dbe51e41
commit 2b7d579dcd
2 changed files with 27 additions and 1 deletions
+25
View File
@@ -168,6 +168,7 @@ size="md" /> Select a
:expandedLogs="expandedLogs"
@update:datetime="setHistogramDate"
@update:scroll="getMoreData"
@update:recordsPerPage="getMoreDataRecordsPerPage"
@expandlog="toggleExpandLog"
/>
</div>
@@ -245,6 +246,30 @@ export default defineComponent({
});
}
},
async getMoreDataRecordsPerPage() {
if (this.searchObj.meta.refreshInterval == 0) {
// this.searchObj.data.resultGrid.currentPage =
// ((this.searchObj.data.queryResults?.hits?.length || 0) +
// ((this.searchObj.data.queryResults?.hits?.length || 0) + 150)) /
// 150 -
// 1;
// this.searchObj.data.resultGrid.currentPage =
// this.searchObj.data.resultGrid.currentPage + 1;
this.searchObj.loading = true;
await this.getQueryData(false);
this.refreshHistogramChart();
if (config.isCloud == "true") {
segment.track("Button Click", {
button: "Get More Data",
user_org: this.store.state.selectedOrganization.identifier,
user_id: this.store.state.userInfo.email,
stream_name: this.searchObj.data.stream.selectedStream.value,
page: "Search Logs",
});
}
}
},
async getMoreData() {
if (this.searchObj.meta.refreshInterval == 0) {
// this.searchObj.data.resultGrid.currentPage =
+2 -1
View File
@@ -455,6 +455,7 @@ export default defineComponent({
"remove:searchTerm",
"search:timeboxed",
"expandlog",
"update:recordsPerPage",
],
props: {
expandedLogs: {
@@ -490,7 +491,7 @@ export default defineComponent({
this.searchObj.data.resultGrid.currentPage = 1;
this.pageNumberInput = this.searchObj.data.resultGrid.currentPage;
this.refreshPartitionPagination(true);
this.$emit("update:scroll");
this.$emit("update:recordsPerPage");
this.searchTableRef.scrollTo(0);
} else if (actionType == "pageChange") {
if (