mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:09:03 +00:00
fix: add new blocks
This commit is contained in:
parent
5769925757
commit
3904aa7c11
@ -55,10 +55,13 @@ export const FormBlockProvider = (props) => {
|
||||
const { __collection } = record;
|
||||
const currentCollection = useCollection();
|
||||
const { designable } = useDesignable();
|
||||
let detailFlag = true;
|
||||
let detailFlag = false;
|
||||
if (Object.keys(record).length > 0) {
|
||||
detailFlag = true;
|
||||
if (!designable && __collection) {
|
||||
detailFlag = __collection === collection;
|
||||
}
|
||||
}
|
||||
const createFlag = (currentCollection.name === collection && !Object.keys(record).length) || !currentCollection.name;
|
||||
return (
|
||||
(detailFlag || createFlag) && (
|
||||
|
Loading…
Reference in New Issue
Block a user