mirror of https://gitee.com/topiam/eiam
🐛 修复 ProList Each child in a list should have a unique "key" prop.
parent
d354cfe94a
commit
95dda06451
|
@ -27,7 +27,7 @@ import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
|||
import type { ActionType } from '@ant-design/pro-components';
|
||||
import { PageContainer, ProList } from '@ant-design/pro-components';
|
||||
import { App, Avatar, Button, Popconfirm, Tag } from 'antd';
|
||||
import { useRef, useState } from 'react';
|
||||
import { Fragment, useRef, useState } from 'react';
|
||||
import CreateModal from './components/CreateModal';
|
||||
import useStyle from './style';
|
||||
import classnames from 'classnames';
|
||||
|
@ -140,7 +140,7 @@ export default () => {
|
|||
},
|
||||
actions: {
|
||||
render: (text, row) => [
|
||||
<>
|
||||
<Fragment key={'status'}>
|
||||
{row.enabled ? (
|
||||
<Popconfirm
|
||||
title={intl.formatMessage({
|
||||
|
@ -192,7 +192,7 @@ export default () => {
|
|||
<a key="enabled">{intl.formatMessage({ id: 'app.enable' })}</a>
|
||||
</Popconfirm>
|
||||
)}
|
||||
</>,
|
||||
</Fragment>,
|
||||
<a
|
||||
key={'detail'}
|
||||
onClick={() => {
|
||||
|
|
|
@ -31,7 +31,7 @@ import type { ActionType } from '@ant-design/pro-components';
|
|||
import { PageContainer, ProList } from '@ant-design/pro-components';
|
||||
import { useMount } from 'ahooks';
|
||||
import { App, Avatar, Button, Popconfirm, Tag, Typography } from 'antd';
|
||||
import { useRef, useState } from 'react';
|
||||
import { Fragment, useRef, useState } from 'react';
|
||||
import CreateDrawer from './components/CreateModal';
|
||||
import UpdateDrawer from './components/UpdateModal';
|
||||
import { EXIST_CALLBACK, IdentityProviderCategory } from './constant';
|
||||
|
@ -216,11 +216,11 @@ const List = (props: { category: IdentityProviderCategory }) => {
|
|||
},
|
||||
content: {
|
||||
search: false,
|
||||
render: (text, row) => [<ListContent key="context" {...row} />],
|
||||
render: (text, row) => <ListContent key="context" {...row} />,
|
||||
},
|
||||
actions: {
|
||||
render: (text, row) => [
|
||||
<>
|
||||
<Fragment key={'status'}>
|
||||
{row.enabled ? (
|
||||
<Popconfirm
|
||||
title={intl.formatMessage({
|
||||
|
@ -246,7 +246,7 @@ const List = (props: { category: IdentityProviderCategory }) => {
|
|||
cancelText={intl.formatMessage({ id: 'app.no' })}
|
||||
key="disabled"
|
||||
>
|
||||
<a key="disabled">
|
||||
<a>
|
||||
{intl.formatMessage({
|
||||
id: 'app.disable',
|
||||
})}
|
||||
|
@ -269,16 +269,16 @@ const List = (props: { category: IdentityProviderCategory }) => {
|
|||
}}
|
||||
okText={intl.formatMessage({ id: 'app.yes' })}
|
||||
cancelText={intl.formatMessage({ id: 'app.no' })}
|
||||
key="disabled"
|
||||
key="enabled"
|
||||
>
|
||||
<a key="enabled">
|
||||
<a>
|
||||
{intl.formatMessage({
|
||||
id: 'app.enable',
|
||||
})}
|
||||
</a>
|
||||
</Popconfirm>
|
||||
)}
|
||||
</>,
|
||||
</Fragment>,
|
||||
<a
|
||||
key="update"
|
||||
onClick={() => {
|
||||
|
|
Loading…
Reference in New Issue