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
7abf2bfe
Commit
7abf2bfe
authored
Dec 19, 2017
by
李勇諭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix server render broken
parent
043480c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
.npmignore
.npmignore
+1
-0
src/PullToRefresh.tsx
src/PullToRefresh.tsx
+6
-5
No files found.
.npmignore
View file @
7abf2bfe
/.idea
/node_modules
/public
/src
...
...
src/PullToRefresh.tsx
View file @
7abf2bfe
...
...
@@ -16,17 +16,18 @@ export interface PullToRefreshState {
}
export
class
PullToRefresh
extends
React
.
Component
<
PullToRefreshProps
,
PullToRefreshState
>
{
private
container
:
HTMLElement
;
private
container
:
any
;
@
autobind
private
containerRef
(
container
:
HTMLElement
)
{
private
containerRef
(
container
)
{
this
.
container
=
container
;
}
private
pullDown
:
HTMLElement
;
private
pullDown
:
any
;
@
autobind
private
pullDownRef
(
pullDown
:
HTMLElement
)
{
private
pullDownRef
(
pullDown
)
{
this
.
pullDown
=
pullDown
;
const
maxPullDownDistance
=
this
.
pullDown
.
firstChild
[
"
getBoundingClientRect
"
]().
height
;
const
maxPullDownDistance
=
this
.
pullDown
&&
this
.
pullDown
.
firstChild
&&
this
.
pullDown
.
firstChild
[
"
getBoundingClientRect
"
]
?
this
.
pullDown
.
firstChild
[
"
getBoundingClientRect
"
]().
height
:
0
;
this
.
setState
({
maxPullDownDistance
});
}
...
...
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