Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Prasetya Saputra
clone_excelso
Commits
2cd8629d
Commit
2cd8629d
authored
May 28, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change pickup name
parent
61b7f074
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
PickupName.js
view/PickupName.js
+20
-14
No files found.
view/PickupName.js
View file @
2cd8629d
import
React
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
FlatList
,
TextInput
,
Alert
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
FlatList
,
TextInput
,
Alert
,
ActivityIndicator
}
from
'react-native'
;
import
{
ScrollView
,
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
{
CheckBox
}
from
'react-native-elements'
;
...
...
@@ -26,6 +26,7 @@ class PickupName extends React.Component {
data
:
[],
// data yg sedang aktif
data_before_search
:
[],
spinner
:
false
,
indicator
:
true
,
}
}
...
...
@@ -135,14 +136,14 @@ class PickupName extends React.Component {
})
this
.
setState
({
spinne
r
:
false
,
indicato
r
:
false
,
})
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
response
.
msg
);
this
.
setState
({
spinne
r
:
false
,
indicato
r
:
false
,
})
})
}
...
...
@@ -285,7 +286,7 @@ class PickupName extends React.Component {
textStyle={styles.spinnerTextStyle}
/> */
}
<
View
style
=
{
styles
.
searchbar
}
>
<
View
style
=
{{
height
:
45
,
borderRadius
:
10
,
borderColor
:
'#ccb46c'
,
borderWidth
:
1
,
flexDirection
:
'row'
,
backgroundColor
:
'red'
}}
>
<
View
style
=
{{
height
:
45
,
borderRadius
:
10
,
borderColor
:
'#ccb46c'
,
borderWidth
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1
,
top
:
5
}}
>
<
MaterialCommunityIcons
name
=
"map-marker"
size
=
{
32
}
color
=
"#ccb46c"
/>
<
/View
>
...
...
@@ -301,15 +302,20 @@ class PickupName extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
body
}
>
{
this
.
state
.
indicator
==
true
?
(
<
ActivityIndicator
size
=
"large"
color
=
"#c9af6d"
/>
)
:
(
<
FlatList
data
=
{
_
.
orderBy
(
this
.
state
.
dataOutlets
,
[
'distance'
],
[
'asc'
])}
renderItem
=
{
this
.
RenderItem
}
keyExtractor
=
{
item
=>
item
.
id
}
windowSize
=
{
5
}
initialNumToRender
=
{
18
}
maxToRenderPerBatch
=
{
2
}
onEndReachedThreshold
=
{
0.5
}
/
>
data
=
{
_
.
orderBy
(
this
.
state
.
dataOutlets
,
[
'distance'
],
[
'asc'
])}
renderItem
=
{
this
.
RenderItem
}
keyExtractor
=
{
item
=>
item
.
id
}
windowSize
=
{
5
}
initialNumToRender
=
{
18
}
maxToRenderPerBatch
=
{
2
}
onEndReachedThreshold
=
{
0.5
}
/
>
)}
<
/View
>
<
/View
>
)
...
...
@@ -337,11 +343,11 @@ const styles = StyleSheet.create({
},
searchbar
:
{
flex
:
1
,
flex
:
0.5
,
justifyContent
:
'center'
,
top
:
10
,
marginRight
:
20
,
marginLeft
:
20
,
backgroundColor
:
'green'
}
})
...
...
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