fix: do not expand the instance list when request is pending

This commit is contained in:
jialin
2025-04-21 18:18:23 +08:00
parent 43b71c7532
commit d60e052f05
3 changed files with 4 additions and 4 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { useIntl } from '@umijs/max';
import { Dropdown, DropDownProps } from 'antd';
import _ from 'lodash';
import React, { useMemo } from 'react';
const DropDownActions: React.FC<DropDownProps> = (props) => {
@@ -14,7 +15,7 @@ const DropDownActions: React.FC<DropDownProps> = (props) => {
const items = useMemo(() => {
return menu?.items?.map((item: any) => ({
...item,
..._.omit(item, 'locale'),
label: item.locale ? intl.formatMessage({ id: item.label }) : item.label
}));
}, [menu?.items, intl]);