Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
myAppraisal
Commits
6af675ae
Commit
6af675ae
authored
Mar 17, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
แก้ bug pagination
parent
70bbdb4d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
sub-job-position-indicators.component.ts
...ition-indicators/sub-job-position-indicators.component.ts
+0
-0
pagination.component.html
src/app/components/pagination/pagination.component.html
+2
-2
pagination.component.ts
src/app/components/pagination/pagination.component.ts
+3
-4
No files found.
src/app/components/job-detail-components/job-position-indicators/sub-job-position-indicators/sub-job-position-indicators.component.ts
View file @
6af675ae
src/app/components/pagination/pagination.component.html
View file @
6af675ae
...
@@ -31,12 +31,12 @@
...
@@ -31,12 +31,12 @@
<!-- ตัวเลือกจำนวนรายการต่อหน้า -->
<!-- ตัวเลือกจำนวนรายการต่อหน้า -->
<li>
<li>
<select
class=
"ti-form-select"
[(
ngModel
)]="
pageSize
"
(
ngModelChange
)="
onPageSizeChange
()"
>
<select
class=
"ti-form-select"
[(
ngModel
)]="
pageSize
"
(
ngModelChange
)="
onPageSizeChange
()"
>
<option
*
ngFor=
"let size of pageSizes"
[
value
]="
size
"
>
{{ size }}
</option>
<option
*
ngFor=
"let size of pageSizes"
[
ngValue
]="
size
"
>
รายการต่อหน้า:
{{ size }}
</option>
</select>
</select>
</li>
</li>
</ul>
</ul>
<ul
class=
"nav-tabs mt-3"
>
<ul
class=
"nav-tabs mt-3"
>
<span
>
Show {{ (currentPage - 1) * pageSize + 1 }} to {{ getEndIndex() }} of {{ totalItems }} items
</span>
<span
>
แสดง {{ (currentPage - 1) * pageSize + 1 }} ถึง {{ getEndIndex() }} จาก {{ totalItems }} รายการ
</span>
</ul>
</ul>
</nav>
</nav>
src/app/components/pagination/pagination.component.ts
View file @
6af675ae
...
@@ -12,13 +12,12 @@ export class PaginationComponent {
...
@@ -12,13 +12,12 @@ export class PaginationComponent {
@
Output
()
pageChange
=
new
EventEmitter
<
number
>
();
@
Output
()
pageChange
=
new
EventEmitter
<
number
>
();
@
Output
()
pageSizeChange
=
new
EventEmitter
<
number
>
();
@
Output
()
pageSizeChange
=
new
EventEmitter
<
number
>
();
constructor
(
private
cdr
:
ChangeDetectorRef
)
{
}
constructor
(
private
cdr
:
ChangeDetectorRef
)
{
}
pageSizes
=
[
10
,
20
,
50
,
100
];
pageSizes
:
number
[]
=
[
10
,
20
,
50
,
100
];
ngOnChanges
()
{
ngOnChanges
()
{
this
.
changePage
(
1
)
this
.
changePage
(
1
)
this
.
cdr
.
detectChanges
();
this
.
cdr
.
detectChanges
();
}
}
get
totalPages
():
number
{
get
totalPages
():
number
{
return
Math
.
ceil
(
this
.
totalItems
/
this
.
pageSize
);
return
Math
.
ceil
(
this
.
totalItems
/
this
.
pageSize
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment