Skip to content

Commit d22a91d

Browse files
authored
feat(QTable): add second parameter edge to scrollTo method to be used with virtual scroll quasarframework#8012 (quasarframework#8152)
1 parent 005a91f commit d22a91d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ui/src/components/table/QTable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ export default Vue.extend({
323323
])
324324
},
325325

326-
scrollTo (toIndex) {
326+
scrollTo (toIndex, edge) {
327327
if (this.$refs.virtScroll !== void 0) {
328-
this.$refs.virtScroll.scrollTo(toIndex)
328+
this.$refs.virtScroll.scrollTo(toIndex, edge)
329329
return
330330
}
331331

ui/src/components/table/QTable.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,6 +2330,12 @@
23302330
"desc": "The index of the row in page (0 based)",
23312331
"required": true,
23322332
"examples": [ "1", 23 ]
2333+
},
2334+
"edge": {
2335+
"type": "String",
2336+
"desc": "Only for virtual scroll - the edge to align to if the row is not visible already (by default it aligns to end if scrolling towards the end and to start otherwise); If the '-force' version is used then it always aligns",
2337+
"values": [ "start", "center", "end", "start-force", "center-force", "end-force" ],
2338+
"addedIn": "v1.14.7"
23332339
}
23342340
},
23352341
"addedIn": "v1.7.2"

0 commit comments

Comments
 (0)