mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:55:33 +00:00
fix(ConfigurationTabs): avoid error (#1782)
This commit is contained in:
parent
0086037425
commit
e787890671
@ -114,6 +114,12 @@ export const ConfigurationTabs = () => {
|
||||
const { data, refresh } = useContext(CollectionCategroriesContext);
|
||||
const { refresh: refreshCM, run, defaultRequest, setState } = useResourceActionContext();
|
||||
const [key, setKey] = useState('all');
|
||||
const [activeKey, setActiveKey] = useState('all');
|
||||
const compile = useCompile();
|
||||
const api = useAPIClient();
|
||||
|
||||
if (!data) return null;
|
||||
|
||||
const tabsItems = data
|
||||
.sort((a, b) => b.sort - a.sort)
|
||||
.concat()
|
||||
@ -131,9 +137,7 @@ export const ConfigurationTabs = () => {
|
||||
closable: false,
|
||||
schema: collectionTableSchema,
|
||||
});
|
||||
const compile = useCompile();
|
||||
const [activeKey, setActiveKey] = useState('all');
|
||||
const api = useAPIClient();
|
||||
|
||||
const onChange = (key: string) => {
|
||||
setActiveKey(key);
|
||||
setKey(uid());
|
||||
|
Loading…
Reference in New Issue
Block a user