Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
react-keep-alive
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
react-keep-alive
Commits
0d1313ac
Commit
0d1313ac
authored
Mar 12, 2019
by
Shen Chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(Fix include and exclude):
parent
656db95d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/utils/getKeepAlive.ts
src/utils/getKeepAlive.ts
+3
-3
src/utils/keepAlive.tsx
src/utils/keepAlive.tsx
+1
-1
No files found.
src/utils/getKeepAlive.ts
View file @
0d1313ac
...
@@ -17,10 +17,10 @@ export default function getKeepAlive(
...
@@ -17,10 +17,10 @@ export default function getKeepAlive(
name
:
string
,
name
:
string
,
include
?:
Pattern
,
include
?:
Pattern
,
exclude
?:
Pattern
,
exclude
?:
Pattern
,
keepAlive
?:
boolean
disabled
?:
boolean
)
{
)
{
if
(
keepAlive
!==
undefined
)
{
if
(
disabled
!==
undefined
)
{
return
keepAlive
;
return
!
disabled
;
}
}
if
(
if
(
(
include
&&
(
!
name
||
!
matches
(
include
,
name
)))
||
(
include
&&
(
!
name
||
!
matches
(
include
,
name
)))
||
...
...
src/utils/keepAlive.tsx
View file @
0d1313ac
...
@@ -437,7 +437,7 @@ export default function keepAliveDecorator<P = any>(Component: React.ComponentTy
...
@@ -437,7 +437,7 @@ export default function keepAliveDecorator<P = any>(Component: React.ComponentTy
warn
(
'
[React Keep Alive] <KeepAlive> components must have key.
'
);
warn
(
'
[React Keep Alive] <KeepAlive> components must have key.
'
);
return
null
;
return
null
;
}
}
const
newKeepAlive
=
getKeepAlive
(
propKey
,
include
,
exclude
,
!
disabled
);
const
newKeepAlive
=
getKeepAlive
(
propKey
,
include
,
exclude
,
disabled
);
this
.
combinedKeepAlive
=
getLifecycle
===
undefined
||
getLifecycle
()
===
LIFECYCLE
.
UPDATING
this
.
combinedKeepAlive
=
getLifecycle
===
undefined
||
getLifecycle
()
===
LIFECYCLE
.
UPDATING
?
newKeepAlive
?
newKeepAlive
:
identification
:
identification
...
...
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