Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nos Hs2023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Språksamlingane
stadnamn
Nos Hs2023
Commits
339d25bc
Commit
339d25bc
authored
3 years ago
by
esikkala
Browse files
Options
Downloads
Patches
Plain Diff
Update table pagination props
parent
e1334fb0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/client/components/facet_results/ResultTable.js
+4
-4
4 additions, 4 deletions
src/client/components/facet_results/ResultTable.js
src/client/components/facet_results/ResultTablePaginationActions.js
+6
-6
6 additions, 6 deletions
.../components/facet_results/ResultTablePaginationActions.js
with
10 additions
and
10 deletions
src/client/components/facet_results/ResultTable.js
+
4
−
4
View file @
339d25bc
...
@@ -150,13 +150,13 @@ class ResultTable extends React.Component {
...
@@ -150,13 +150,13 @@ class ResultTable extends React.Component {
)
)
}
}
handleChan
gePa
ge
=
(
event
,
page
)
=>
{
handle
Page
Change
=
(
event
,
page
)
=>
{
if
(
event
!=
null
&&
!
this
.
props
.
data
.
fetching
)
{
if
(
event
!=
null
&&
!
this
.
props
.
data
.
fetching
)
{
this
.
props
.
updatePage
(
this
.
props
.
resultClass
,
page
)
this
.
props
.
updatePage
(
this
.
props
.
resultClass
,
page
)
}
}
}
}
handle
OnChange
RowsPerPage
=
event
=>
{
handleRowsPerPage
Change
=
event
=>
{
const
rowsPerPage
=
event
.
target
.
value
const
rowsPerPage
=
event
.
target
.
value
if
(
rowsPerPage
!==
this
.
props
.
data
.
pagesize
)
{
if
(
rowsPerPage
!==
this
.
props
.
data
.
pagesize
)
{
this
.
props
.
updateRowsPerPage
(
this
.
props
.
resultClass
,
rowsPerPage
)
this
.
props
.
updateRowsPerPage
(
this
.
props
.
resultClass
,
rowsPerPage
)
...
@@ -299,8 +299,8 @@ class ResultTable extends React.Component {
...
@@ -299,8 +299,8 @@ class ResultTable extends React.Component {
inputProps
:
{
'
aria-label
'
:
'
rows per page
'
},
inputProps
:
{
'
aria-label
'
:
'
rows per page
'
},
native
:
true
native
:
true
}}
}}
onChan
gePa
ge
=
{
this
.
handleChan
gePa
ge
}
on
Page
Change
=
{
this
.
handle
Page
Change
}
on
Change
RowsPerPage
=
{
this
.
handle
OnChange
RowsPerPage
}
onRowsPerPage
Change
=
{
this
.
handleRowsPerPage
Change
}
ActionsComponent
=
{
ResultTablePaginationActions
}
ActionsComponent
=
{
ResultTablePaginationActions
}
/
>
/
>
<
div
className
=
{
classes
.
tableContainer
}
>
<
div
className
=
{
classes
.
tableContainer
}
>
...
...
This diff is collapsed.
Click to expand it.
src/client/components/facet_results/ResultTablePaginationActions.js
+
6
−
6
View file @
339d25bc
...
@@ -15,18 +15,18 @@ const styles = theme => ({
...
@@ -15,18 +15,18 @@ const styles = theme => ({
})
})
const
ResultTablePaginationActions
=
props
=>
{
const
ResultTablePaginationActions
=
props
=>
{
const
{
theme
,
classes
,
count
,
page
,
rowsPerPage
,
onChan
gePa
ge
}
=
props
const
{
theme
,
classes
,
count
,
page
,
rowsPerPage
,
on
Page
Change
}
=
props
const
handleFirstPageButtonClick
=
event
=>
{
const
handleFirstPageButtonClick
=
event
=>
{
onChan
gePa
ge
(
event
,
0
)
on
Page
Change
(
event
,
0
)
}
}
const
handleBackButtonClick
=
event
=>
{
const
handleBackButtonClick
=
event
=>
{
onChan
gePa
ge
(
event
,
page
-
1
)
on
Page
Change
(
event
,
page
-
1
)
}
}
const
handleNextButtonClick
=
event
=>
{
const
handleNextButtonClick
=
event
=>
{
onChan
gePa
ge
(
event
,
page
+
1
)
on
Page
Change
(
event
,
page
+
1
)
}
}
const
handleLastPageButtonClick
=
event
=>
{
const
handleLastPageButtonClick
=
event
=>
{
onChan
gePa
ge
(
event
,
Math
.
max
(
0
,
Math
.
ceil
(
count
/
rowsPerPage
)
-
1
))
on
Page
Change
(
event
,
Math
.
max
(
0
,
Math
.
ceil
(
count
/
rowsPerPage
)
-
1
))
}
}
return
(
return
(
<
div
className
=
{
classes
.
root
}
>
<
div
className
=
{
classes
.
root
}
>
...
@@ -61,7 +61,7 @@ const ResultTablePaginationActions = props => {
...
@@ -61,7 +61,7 @@ const ResultTablePaginationActions = props => {
ResultTablePaginationActions
.
propTypes
=
{
ResultTablePaginationActions
.
propTypes
=
{
classes
:
PropTypes
.
object
.
isRequired
,
classes
:
PropTypes
.
object
.
isRequired
,
count
:
PropTypes
.
number
.
isRequired
,
count
:
PropTypes
.
number
.
isRequired
,
onChan
gePa
ge
:
PropTypes
.
func
.
isRequired
,
on
Page
Change
:
PropTypes
.
func
.
isRequired
,
page
:
PropTypes
.
number
.
isRequired
,
page
:
PropTypes
.
number
.
isRequired
,
rowsPerPage
:
PropTypes
.
number
.
isRequired
,
rowsPerPage
:
PropTypes
.
number
.
isRequired
,
theme
:
PropTypes
.
object
.
isRequired
theme
:
PropTypes
.
object
.
isRequired
...
...
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