Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
duanledexianxianxian
ant-design-pro
Commits
faec7edc
Commit
faec7edc
authored
Dec 01, 2017
by
ιεΈ
Committed by
niko
Dec 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug when TagSelectOption is 1 (#336)
parent
687057be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/components/AvatarList/index.d.ts
src/components/AvatarList/index.d.ts
+1
-1
src/components/TagSelect/index.js
src/components/TagSelect/index.js
+3
-4
No files found.
src/components/AvatarList/index.d.ts
View file @
faec7edc
import
React
from
"
react
"
;
import
React
from
"
react
"
;
export
interface
AvatarItemProps
{
export
interface
AvatarItemProps
{
tips
:
string
|
React
.
ReactNode
;
tips
:
React
.
ReactNode
;
src
:
string
;
src
:
string
;
}
}
...
...
src/components/TagSelect/index.js
View file @
faec7edc
...
@@ -39,7 +39,8 @@ class TagSelect extends Component {
...
@@ -39,7 +39,8 @@ class TagSelect extends Component {
}
}
getAllTags
()
{
getAllTags
()
{
const
{
children
}
=
this
.
props
;
let
{
children
}
=
this
.
props
;
children
=
React
.
Children
.
toArray
(
children
);
const
checkedTags
=
children
const
checkedTags
=
children
.
filter
(
child
=>
this
.
isTagSelectOption
(
child
))
.
filter
(
child
=>
this
.
isTagSelectOption
(
child
))
.
map
(
child
=>
child
.
props
.
value
);
.
map
(
child
=>
child
.
props
.
value
);
...
@@ -86,7 +87,6 @@ class TagSelect extends Component {
...
@@ -86,7 +87,6 @@ class TagSelect extends Component {
[
styles
.
hasExpandTag
]:
expandable
,
[
styles
.
hasExpandTag
]:
expandable
,
[
styles
.
expanded
]:
expand
,
[
styles
.
expanded
]:
expand
,
});
});
return
(
return
(
<
div
className
=
{
cls
}
style
=
{
style
}
>
<
div
className
=
{
cls
}
style
=
{
style
}
>
<
CheckableTag
<
CheckableTag
...
@@ -97,8 +97,7 @@ class TagSelect extends Component {
...
@@ -97,8 +97,7 @@ class TagSelect extends Component {
ε ¨ι¨
ε ¨ι¨
<
/CheckableTag
>
<
/CheckableTag
>
{
{
checkedTags
&&
children
checkedTags
&&
React
.
Children
.
map
(
children
,
(
child
)
=>
{
.
map
((
child
)
=>
{
if
(
this
.
isTagSelectOption
(
child
))
{
if
(
this
.
isTagSelectOption
(
child
))
{
return
React
.
cloneElement
(
child
,
{
return
React
.
cloneElement
(
child
,
{
key
:
`tag-select-
${
child
.
props
.
value
}
`
,
key
:
`tag-select-
${
child
.
props
.
value
}
`
,
...
...
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