Skip to content

Commit 5fc02d0

Browse files
Version 2.3.23
1 parent c21d07d commit 5fc02d0

File tree

9 files changed

+103
-62
lines changed

9 files changed

+103
-62
lines changed

dist/vue-quintable.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-quintable.es.js

Lines changed: 65 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-quintable.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-quintable.umd.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-quintable.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sensetence/vue-quintable",
3-
"version": "2.3.22",
3+
"version": "2.3.23",
44
"private": false,
55
"scripts": {
66
"dev": "vite --config vite.build.config.js",

src/components/VueQuintable.vue

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,6 +2727,13 @@ export default {
27272727
return;
27282728
}
27292729
2730+
const realCurrentIndex = this.visibleRowIndexes.findIndex(
2731+
(x) => x === this.activeRow
2732+
);
2733+
if (realCurrentIndex < 0) {
2734+
this.activeRow = null;
2735+
}
2736+
27302737
if (this.currentPage !== 1) {
27312738
this.currentPage = 1;
27322739
} else if (!this.configFinal.keepSelect) {
@@ -2853,6 +2860,8 @@ export default {
28532860
this.clearLists();
28542861
this.initLists();
28552862
2863+
this.activeRow = null;
2864+
28562865
this.$nextTick(() => {
28572866
this.recomputeEssentials();
28582867
this.$forceUpdate();
@@ -2880,6 +2889,8 @@ export default {
28802889
this.initLists();
28812890
this.$forceUpdate();
28822891
2892+
this.activeRow = null;
2893+
28832894
if (this.configFinal.ajaxUrl) {
28842895
this.loadViaAjax(false, true, "CONFIG");
28852896
}
@@ -2926,6 +2937,7 @@ export default {
29262937
*/
29272938
currentPage(val) {
29282939
this.pageOffset = 0;
2940+
this.activeRow = null;
29292941
29302942
this.$emit("update:page", val, "update:page");
29312943
@@ -3016,7 +3028,8 @@ export default {
30163028
},
30173029
},
30183030
activeRow(val) {
3019-
this.$emit("active:row", this.rowsFinal[val], "active:row", val);
3031+
const realIndex = this.visibleRowIndexes.findIndex((x) => x === val);
3032+
this.$emit("active:row", this.rowsFinal[val], "active:row", realIndex);
30203033
},
30213034
},
30223035
methods: {
@@ -4288,19 +4301,27 @@ export default {
42884301
if (this.activeRow === null) {
42894302
return;
42904303
}
4291-
event.preventDefault();
42924304
if (event.keyCode === 40) {
4293-
if (this.activeRow === this.rowsFinal.length - 1) {
4305+
event.preventDefault();
4306+
const realCurrentIndex = this.visibleRowIndexes.findIndex(
4307+
(x) => x === this.activeRow
4308+
);
4309+
if (realCurrentIndex === this.visibleRowIndexes.length - 1) {
42944310
this.activeRow = 0;
42954311
} else {
4296-
this.activeRow++;
4312+
this.activeRow = this.visibleRowIndexes[realCurrentIndex + 1];
42974313
}
42984314
}
42994315
if (event.keyCode === 38) {
4300-
if (this.activeRow === 0) {
4301-
this.activeRow = this.rowsFinal.length - 1;
4316+
event.preventDefault();
4317+
const realCurrentIndex = this.visibleRowIndexes.findIndex(
4318+
(x) => x === this.activeRow
4319+
);
4320+
if (realCurrentIndex === 0) {
4321+
this.activeRow =
4322+
this.visibleRowIndexes[this.visibleRowIndexes.length - 1];
43024323
} else {
4303-
this.activeRow--;
4324+
this.activeRow = this.visibleRowIndexes[realCurrentIndex - 1];
43044325
}
43054326
}
43064327
},

src/examples/BasicExample.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ export default {
143143
headline: "Job",
144144
},
145145
],
146-
enableRowTabIndex: true,
147146
},
148147
149148
rows: [

src/examples/SelectExample.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
prettySelect:true,
7878
pagination:8,
7979
selectAllRows:this.selectAllRows,
80+
enableRowTabIndex: true,
8081

8182
}
8283
},
@@ -184,6 +185,8 @@ export default {
184185
prettySelect: true,
185186
pagination: 8,
186187
selectAllRows: this.selectAllRows,
188+
enableRowTabIndex: true,
189+
search: true,
187190
};
188191
},
189192
rows() {

0 commit comments

Comments
 (0)