Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
R
react-pull-to-refresh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jason.yap
react-pull-to-refresh
Commits
9310e0f0
Commit
9310e0f0
authored
Jan 03, 2018
by
AFOC-1709091830\echou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor
parent
951c7386
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
src/components/PullDownContent.tsx
src/components/PullDownContent.tsx
+1
-1
src/components/PullToRefresh.tsx
src/components/PullToRefresh.tsx
+8
-0
src/components/RefreshContent.tsx
src/components/RefreshContent.tsx
+1
-1
src/components/ReleaseContent.tsx
src/components/ReleaseContent.tsx
+1
-1
src/index.ts
src/index.ts
+1
-1
No files found.
src/components/PullDownContent.tsx
View file @
9310e0f0
...
...
@@ -2,7 +2,7 @@ import * as React from "react";
import
styled
from
"
styled-components
"
;
export
interface
PullDownContentProps
{
height
?:
number
;
height
?:
string
;
background
?:
any
;
label
?:
string
;
}
...
...
src/PullToRefresh.tsx
→
src/
components/
PullToRefresh.tsx
View file @
9310e0f0
...
...
@@ -51,6 +51,10 @@ export class PullToRefresh extends React.Component<PullToRefreshProps, PullToRef
}
public
componentDidMount
():
void
{
if
(
!
this
.
container
)
{
return
;
}
this
.
container
.
addEventListener
(
"
touchstart
"
,
this
.
onTouchStart
);
this
.
container
.
addEventListener
(
"
touchmove
"
,
this
.
onTouchMove
);
this
.
container
.
addEventListener
(
"
touchend
"
,
this
.
onEnd
);
...
...
@@ -60,6 +64,10 @@ export class PullToRefresh extends React.Component<PullToRefreshProps, PullToRef
}
public
componentWillUnmount
():
void
{
if
(
!
this
.
container
)
{
return
;
}
this
.
container
.
removeEventListener
(
"
touchstart
"
,
this
.
onTouchStart
);
this
.
container
.
removeEventListener
(
"
touchmove
"
,
this
.
onTouchMove
);
this
.
container
.
removeEventListener
(
"
touchend
"
,
this
.
onEnd
);
...
...
src/components/RefreshContent.tsx
View file @
9310e0f0
...
...
@@ -2,7 +2,7 @@ import * as React from "react";
import
styled
from
"
styled-components
"
;
export
interface
RefreshContentProps
{
height
?:
number
;
height
?:
string
;
background
?:
any
;
}
...
...
src/components/ReleaseContent.tsx
View file @
9310e0f0
...
...
@@ -2,7 +2,7 @@ import * as React from "react";
import
styled
from
"
styled-components
"
;
export
interface
ReleaseContentProps
{
height
?:
number
;
height
?:
string
;
background
?:
any
;
label
?:
string
;
}
...
...
src/index.ts
View file @
9310e0f0
import
{
PullToRefresh
}
from
"
./PullToRefresh
"
;
import
{
PullToRefresh
}
from
"
./
components/
PullToRefresh
"
;
import
{
RefreshContent
}
from
"
./components/RefreshContent
"
;
import
{
PullDownContent
}
from
"
./components/PullDownContent
"
;
import
{
ReleaseContent
}
from
"
./components/ReleaseContent
"
;
...
...
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