Skip to content

Commit

Permalink
fix for react unique key warning (#10742)
Browse files Browse the repository at this point in the history
  • Loading branch information
maoling authored Jul 10, 2023
1 parent cae21e2 commit 8bb957d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ class NewPermissions extends React.Component {
placeholder={locale.resourcePlaceholder}
style={{ width: '100%' }}
>
{namespaces.map(({ namespace, namespaceShowName }) => (
<Option value={`${namespace}:*:*`}>
{namespaces.map(({ namespace, namespaceShowName }, index) => (
<Option key={index} value={`${namespace}:*:*`}>
{namespaceShowName} {namespace ? `(${namespace})` : ''}
</Option>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1361,8 +1361,9 @@ class ConfigurationManagement extends React.Component {
locaid: 'configsDelete',
onClick: () => this.cloneSelectedDataConfirm(),
},
].map(item => (
].map((item, index) => (
<Button
key={index}
warning={item.warning}
type="primary"
style={{ marginRight: 10 }}
Expand Down

0 comments on commit 8bb957d

Please sign in to comment.