Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
views_infinite_scroll
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
views_infinite_scroll
Merge requests
!27
Issue
#3173923
: Apply some changes from
#4
, add tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3173923
: Apply some changes from
#4
, add tests
issue/views_infinite_scroll-3173923:3173923-allow-newcontent-js
into
2.0.x
Overview
1
Commits
6
Pipelines
3
Changes
2
Open
Kent Richards
requested to merge
issue/views_infinite_scroll-3173923:3173923-allow-newcontent-js
into
2.0.x
7 months ago
Overview
1
Commits
6
Pipelines
3
Changes
2
Expand
Closes
#3173923
0
0
Merge request reports
Compare
2.0.x
version 2
e7d43c9b
7 months ago
version 1
91219344
7 months ago
2.0.x (HEAD)
and
latest version
latest version
cc39d1ee
6 commits,
7 months ago
version 2
e7d43c9b
5 commits,
7 months ago
version 1
91219344
3 commits,
7 months ago
2 files
+
224
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
js/infinite-scroll.js
+
8
−
0
Options
@@ -60,6 +60,14 @@
// Add the new rows to existing view.
.
append
(
$newRows
);
// Set focus to the first link in the first row result.
if
(
$newRows
.
length
>
0
)
{
var
$newFocus
=
$
(
$newRows
[
0
]).
find
(
'
a
'
);
if
(
$newFocus
.
length
>
0
)
{
$newFocus
[
0
].
focus
();
}
}
// Replace the pager link with the new link and ajaxPageState values.
$existingPager
.
replaceWith
(
$newPager
);
Loading