fix: clear models expand keys
This commit is contained in:
@@ -127,7 +127,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
loading,
|
||||
total
|
||||
}) => {
|
||||
const [expandAtom] = useAtom(modelsExpandKeysAtom);
|
||||
const [expandAtom, setExpandAtom] = useAtom(modelsExpandKeysAtom);
|
||||
const access = useAccess();
|
||||
const intl = useIntl();
|
||||
const navigate = useNavigate();
|
||||
@@ -227,6 +227,12 @@ const Models: React.FC<ModelsProps> = ({
|
||||
}
|
||||
}, [deleteIds]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
setExpandAtom([]);
|
||||
};
|
||||
}, []);
|
||||
|
||||
const sourceOptions = [
|
||||
{
|
||||
label: intl.formatMessage({ id: 'menu.models.modelCatalog' }),
|
||||
|
||||
Reference in New Issue
Block a user