fix: edit user password optional

This commit is contained in:
jialin
2024-07-19 17:29:39 +08:00
parent b8b0d39635
commit b48be3b883
11 changed files with 56 additions and 25 deletions
+3 -1
View File
@@ -25,7 +25,7 @@ const APIKeys: React.FC = () => {
});
const intl = useIntl();
const modalRef = useRef<any>(null);
const [dataSource, setDataSource] = useState([]);
const [dataSource, setDataSource] = useState<ListItem[]>([]);
const [total, setTotal] = useState(0);
const [openAddModal, setOpenAddModal] = useState(false);
const [loading, setLoading] = useState(false);
@@ -100,6 +100,7 @@ const APIKeys: React.FC = () => {
const handleDelete = (row: ListItem) => {
modalRef.current.show({
content: 'apikeys.table.apikeys',
name: row.name,
async onOk() {
console.log('OK');
await deleteApisKey(row.id);
@@ -111,6 +112,7 @@ const APIKeys: React.FC = () => {
const handleDeleteBatch = () => {
modalRef.current.show({
content: 'apikeys.table.apikeys',
selection: true,
async onOk() {
await handleBatchRequest(rowSelection.selectedRowKeys, deleteApisKey);
rowSelection.clearSelections();