fix: details block is not displayed
This commit is contained in:
parent
c360d957d0
commit
5769925757
@ -55,7 +55,10 @@ export const FormBlockProvider = (props) => {
|
|||||||
const { __collection } = record;
|
const { __collection } = record;
|
||||||
const currentCollection = useCollection();
|
const currentCollection = useCollection();
|
||||||
const { designable } = useDesignable();
|
const { designable } = useDesignable();
|
||||||
const detailFlag = (Object.keys(record).length > 0 && designable) || __collection === collection;
|
let detailFlag = true;
|
||||||
|
if (!designable && __collection) {
|
||||||
|
detailFlag = __collection === collection;
|
||||||
|
}
|
||||||
const createFlag = (currentCollection.name === collection && !Object.keys(record).length) || !currentCollection.name;
|
const createFlag = (currentCollection.name === collection && !Object.keys(record).length) || !currentCollection.name;
|
||||||
return (
|
return (
|
||||||
(detailFlag || createFlag) && (
|
(detailFlag || createFlag) && (
|
||||||
|
Loading…
Reference in New Issue
Block a user