Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchParapheur
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchParapheur
Commits
0e321a7e
Commit
0e321a7e
authored
4 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FIX #14568 TIME 0:25 fix scroll event after re search (when scroll reach end of data)
parent
45607ba8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/frontend/app/search/search.component.html
+1
-1
1 addition, 1 deletion
src/frontend/app/search/search.component.html
src/frontend/app/search/search.component.ts
+21
-13
21 additions, 13 deletions
src/frontend/app/search/search.component.ts
with
22 additions
and
14 deletions
src/frontend/app/search/search.component.html
+
1
−
1
View file @
0e321a7e
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
</ion-item>
</ion-item>
</ion-virtual-scroll>
</ion-virtual-scroll>
</ion-list>
</ion-list>
<ion-infinite-scroll
*ngIf=
"count > 0"
threshold=
"100px"
(ionInfinite)=
"loadData($event)"
>
<ion-infinite-scroll
threshold=
"100px"
(ionInfinite)=
"loadData($event)"
>
<ion-infinite-scroll-content
loadingSpinner=
"bubbles"
loadingText=
"Loading more data..."
>
<ion-infinite-scroll-content
loadingSpinner=
"bubbles"
loadingText=
"Loading more data..."
>
</ion-infinite-scroll-content>
</ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-infinite-scroll>
...
...
This diff is collapsed.
Click to expand it.
src/frontend/app/search/search.component.ts
+
21
−
13
View file @
0e321a7e
...
@@ -2,7 +2,7 @@ import { DatePipe } from '@angular/common';
...
@@ -2,7 +2,7 @@ import { DatePipe } from '@angular/common';
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
Component
,
OnInit
,
TemplateRef
,
ViewChild
,
ViewContainerRef
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
,
TemplateRef
,
ViewChild
,
ViewContainerRef
}
from
'
@angular/core
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
ActionSheetController
,
AlertController
,
LoadingController
,
MenuController
}
from
'
@ionic/angular
'
;
import
{
ActionSheetController
,
AlertController
,
IonInfiniteScroll
,
LoadingController
,
MenuController
}
from
'
@ionic/angular
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
TranslateService
}
from
'
@ngx-translate/core
'
;
import
{
of
}
from
'
rxjs
'
;
import
{
of
}
from
'
rxjs
'
;
import
{
catchError
,
exhaustMap
,
tap
}
from
'
rxjs/operators
'
;
import
{
catchError
,
exhaustMap
,
tap
}
from
'
rxjs/operators
'
;
...
@@ -82,10 +82,13 @@ export class SearchComponent implements OnInit {
...
@@ -82,10 +82,13 @@ export class SearchComponent implements OnInit {
limit
:
number
=
10
;
limit
:
number
=
10
;
count
:
number
=
0
;
count
:
number
=
0
;
openedLine
=
''
;
openedLine
=
''
;
reActiveInfinite
:
any
;
@
ViewChild
(
'
appVisaWorkflow
'
,
{
static
:
false
})
appVisaWorkflow
:
VisaWorkflowComponent
;
@
ViewChild
(
'
appVisaWorkflow
'
,
{
static
:
false
})
appVisaWorkflow
:
VisaWorkflowComponent
;
@
ViewChild
(
'
rightContent
'
,
{
static
:
true
})
rightContent
:
TemplateRef
<
any
>
;
@
ViewChild
(
'
rightContent
'
,
{
static
:
true
})
rightContent
:
TemplateRef
<
any
>
;
@
ViewChild
(
IonInfiniteScroll
)
infiniteScroll
:
IonInfiniteScroll
;
constructor
(
constructor
(
public
http
:
HttpClient
,
public
http
:
HttpClient
,
private
translate
:
TranslateService
,
private
translate
:
TranslateService
,
...
@@ -138,7 +141,6 @@ export class SearchComponent implements OnInit {
...
@@ -138,7 +141,6 @@ export class SearchComponent implements OnInit {
}
}
onSubmit
()
{
onSubmit
()
{
console
.
log
(
this
.
formatDatas
());
this
.
search
();
this
.
search
();
this
.
menu
.
close
(
'
right-menu
'
);
this
.
menu
.
close
(
'
right-menu
'
);
}
}
...
@@ -226,6 +228,7 @@ export class SearchComponent implements OnInit {
...
@@ -226,6 +228,7 @@ export class SearchComponent implements OnInit {
tap
((
data
:
any
)
=>
{
tap
((
data
:
any
)
=>
{
this
.
ressources
=
this
.
formatListDatas
(
data
.
documents
);
this
.
ressources
=
this
.
formatListDatas
(
data
.
documents
);
this
.
count
=
data
.
count
;
this
.
count
=
data
.
count
;
this
.
infiniteScroll
.
disabled
=
false
;
resolve
(
true
);
resolve
(
true
);
}),
}),
catchError
((
err
:
any
)
=>
{
catchError
((
err
:
any
)
=>
{
...
@@ -238,17 +241,22 @@ export class SearchComponent implements OnInit {
...
@@ -238,17 +241,22 @@ export class SearchComponent implements OnInit {
}
}
loadData
(
event
:
any
)
{
loadData
(
event
:
any
)
{
this
.
offset
=
this
.
offset
+
this
.
limit
;
if
(
this
.
count
<=
this
.
limit
)
{
event
.
target
.
complete
();
this
.
http
.
post
(
'
../rest/search/documents?limit=
'
+
this
.
limit
+
'
&offset=
'
+
this
.
offset
,
this
.
formatDatas
()).
pipe
(
event
.
target
.
disabled
=
true
;
tap
((
data
:
any
)
=>
{
}
else
{
this
.
ressources
=
this
.
ressources
.
concat
(
this
.
formatListDatas
(
data
.
documents
));
this
.
offset
=
this
.
offset
+
this
.
limit
;
event
.
target
.
complete
();
if
(
this
.
count
===
this
.
ressources
.
length
)
{
this
.
http
.
post
(
'
../rest/search/documents?limit=
'
+
this
.
limit
+
'
&offset=
'
+
this
.
offset
,
this
.
formatDatas
()).
pipe
(
event
.
target
.
disabled
=
true
;
tap
((
data
:
any
)
=>
{
}
this
.
ressources
=
this
.
ressources
.
concat
(
this
.
formatListDatas
(
data
.
documents
));
})
event
.
target
.
complete
();
).
subscribe
();
if
(
this
.
count
===
this
.
ressources
.
length
)
{
event
.
target
.
disabled
=
true
;
}
})
).
subscribe
();
}
}
}
async
interruptWorkflow
(
item
:
any
)
{
async
interruptWorkflow
(
item
:
any
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment