Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix each child in list should have key in iconModal #269

Merged
merged 2 commits into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/routes/System/Resource/AddModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class AddModal extends Component {
})(
<Input
readOnly
placeholder={!icon&&getIntlContent("SHENYU.SYSTEM.ICON.INPUT")}
placeholder={getIntlContent("SHENYU.SYSTEM.ICON.INPUT")}
prefix={(this.state.icon||icon)&&<Icon type={this.state.icon||icon} />}
suffix={
<Tooltip title={getIntlContent("SHENYU.SYSTEM.ICON.INPUT")}>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/System/Resource/IconModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,9 @@ export default class IconModal extends Component {
/>
<Card className={styles.iconCard}>
{
Object.keys(iconMap).map(groupName=>{
Object.keys(iconMap).map((groupName, index)=>{
return (
<Fragment>
<Fragment key={index}>
<h4>{getIntlContent(groupName) || groupName}</h4>
<div className={styles.iconList}>
{iconMap[groupName].map(icon => {
Expand Down