Skip to content

Commit 697327a

Browse files
author
gmateo
committed
reset page to 0 when searching
1 parent 0e2e1e8 commit 697327a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/data-manager.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default class DataManager {
55
applyFilters = false;
66
applySearch = false;
77
currentPage = 0;
8-
detailPanelType = 'multiple'
8+
detailPanelType = 'multiple'
99
lastDetailPanelRow = undefined;
1010
lastEditingRow = undefined;
1111
orderBy = -1;
@@ -153,6 +153,7 @@ export default class DataManager {
153153
changeSearchText(searchText) {
154154
this.searchText = searchText;
155155
this.searched = false;
156+
this.currentPage = 0;
156157
}
157158

158159
changeRowEditing(rowData, mode) {
@@ -269,10 +270,10 @@ export default class DataManager {
269270
else if (result.destination.droppableId === "groups" && result.source.droppableId === "headers") {
270271
const newGroup = this.columns.find(c => c.tableData.id == result.draggableId);
271272

272-
if(newGroup.grouping === false || !newGroup.field){
273+
if (newGroup.grouping === false || !newGroup.field) {
273274
return;
274275
}
275-
276+
276277
groups.splice(result.destination.index, 0, newGroup);
277278
}
278279
else if (result.destination.droppableId === "headers" && result.source.droppableId === "groups") {

0 commit comments

Comments
 (0)