Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Rex Dri
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
42
Issues
42
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rex Dri
Rex Dri
Commits
c5b277aa
Commit
c5b277aa
authored
Jul 14, 2019
by
Florent Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed search presentation, no more swappable views for performance and dot pagination
parent
80d6f86e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
25 deletions
+13
-25
frontend/src/components/search/UnivList.js
frontend/src/components/search/UnivList.js
+13
-25
No files found.
frontend/src/components/search/UnivList.js
View file @
c5b277aa
...
...
@@ -9,7 +9,6 @@ import Divider from "@material-ui/core/Divider";
import
Button
from
"
@material-ui/core/Button
"
;
import
KeyboardArrowLeft
from
"
@material-ui/icons/KeyboardArrowLeft
"
;
import
KeyboardArrowRight
from
"
@material-ui/icons/KeyboardArrowRight
"
;
import
SwipeableViews
from
"
react-swipeable-views
"
;
import
range
from
"
../../utils/range
"
;
import
{
APP_ROUTES
}
from
"
../../config/appRoutes
"
;
import
isEqual
from
"
lodash/isEqual
"
;
...
...
@@ -69,35 +68,24 @@ class UnivList extends React.Component {
return
(
<
div
className
=
{
classes
.
root
}
>
<
SwipeableViews
axis
=
{
theme
.
direction
===
"
rtl
"
?
"
x-reverse
"
:
"
x
"
}
index
=
{
this
.
state
.
activeStep
}
onChangeIndex
=
{(
step
)
=>
this
.
handleStepChange
(
step
)}
enableMouseEvents
>
{
range
(
maxSteps
).
map
(
page
=>
(
<
div
key
=
{
page
}
>
<
List
component
=
"
nav
"
>
<
Divider
/>
{
getIndexesOnPage
(
page
).
map
(
univIdx
=>
(
<
CustomNavLink
to
=
{
APP_ROUTES
.
forUniversity
(
universitiesToList
[
univIdx
].
id
)}
key
=
{
univIdx
}
>
<
ListItem
button
divider
=
{
true
}
key
=
{
univIdx
}
>
<
ListItemText
primary
=
{
universitiesToList
[
univIdx
].
name
}
/
>
<
/ListItem
>
<
/CustomNavLink
>
)
)}
<
/List
>
<
/div
>
))}
<
/SwipeableViews
>
<
List
component
=
"
nav
"
>
<
Divider
/>
{
getIndexesOnPage
(
activeStep
).
map
(
univIdx
=>
(
<
CustomNavLink
to
=
{
APP_ROUTES
.
forUniversity
(
universitiesToList
[
univIdx
].
id
)}
key
=
{
univIdx
}
>
<
ListItem
button
divider
=
{
true
}
key
=
{
univIdx
}
>
<
ListItemText
primary
=
{
universitiesToList
[
univIdx
].
name
}
/
>
<
/ListItem
>
<
/CustomNavLink
>
)
)}
<
/List
>
<
MobileStepper
steps
=
{
maxSteps
}
position
=
"
static
"
variant
=
{
"
progress
"
}
activeStep
=
{
activeStep
}
className
=
{
classes
.
mobileStepper
}
nextButton
=
{
...
...
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