Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
4ac4e509
Commit
4ac4e509
authored
Aug 29, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update search by timer name
parent
d0ee40db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
screens/Private/TimerScreen/TimerScreen.ios.js
+12
-2
No files found.
screens/Private/TimerScreen/TimerScreen.ios.js
View file @
4ac4e509
...
...
@@ -83,6 +83,7 @@ class TimerScreen extends Component {
...
initState
,
pickerSelectData
:
[],
subBreakerList
:
[],
data
:
[],
};
constructor
(
props
)
{
super
(
props
);
...
...
@@ -138,6 +139,15 @@ class TimerScreen extends Component {
updateSearch
=
search
=>
{
this
.
setState
({
search
});
const
newData
=
this
.
props
.
allTimers
.
filter
(
item
=>
{
const
itemData
=
`
${
item
.
name
.
toUpperCase
()}
`
;
const
textData
=
search
.
toUpperCase
();
return
itemData
.
indexOf
(
textData
)
>
-
1
;
});
this
.
setState
({
data
:
newData
,
});
};
createNewOrEditTimer
=
async
()
=>
{
...
...
@@ -264,7 +274,7 @@ class TimerScreen extends Component {
<
Text
style
=
{[
theme
.
normalText
,
theme
.
textDark
,
theme
.
mt2
]}
>
Set
Time
<
/Text
>
<
DatePicker
date
=
{
this
.
state
.
timer
}
date
=
{
new
Date
(
this
.
state
.
timer
)
}
onDateChange
=
{
date
=>
this
.
setState
({
timer
:
date
})}
mode
=
"time"
locale
=
"fr"
...
...
@@ -414,7 +424,7 @@ class TimerScreen extends Component {
{
/* List Timer */
}
<
FlatList
contentContainerStyle
=
{{
paddingBottom
:
isIphoneX
()
?
90
:
55
}}
data
=
{
this
.
props
.
allTimers
}
data
=
{
this
.
state
.
search
?
this
.
state
.
data
:
this
.
props
.
allTimers
}
refreshing
=
{
this
.
props
.
isLoading
}
onRefresh
=
{
this
.
props
.
getTimers
}
ListEmptyComponent
=
{()
=>
(
...
...
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