firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.14k stars 185 forks source link

BUG: spreadChildren for propertyBuilder is not working correctly! #552

Closed mvarchdev closed 7 months ago

mvarchdev commented 11 months ago

When you use function, builder for property and you enable spreadChildren, it will show columns, but not Preview fields - then to the right it will show values of non spreadChildren values

How to reproduce?

This property works normally:

testProperty: {
                dataType: "map",
                spreadChildren: true,
                properties: {
                    testInside: {
                        name: "Test inside 1",
                        dataType: "string"
                    },
                    testInsideSecond: {
                        name: "Test inside 2",
                        dataType: "string"
                    }
                }
            },
Screenshot 2023-09-19 at 17 21 50

This property is not working normally:

testProperty: ()=>({
                dataType: "map",
                spreadChildren: true,
                properties: {
                    testInside: {
                        name: "Test inside 1",
                        dataType: "string"
                    },
                    testInsideSecond: {
                        name: "Test inside 2",
                        dataType: "string"
                    }
                }
            }),
Screenshot 2023-09-19 at 17 21 02

Currently I am trying to find bug in code, but any suggestions would be helpful! Thanks in advance!

mvarchdev commented 11 months ago

I found the problem, here (https://github.com/firecmsco/firecms/blob/b9726cff13e06c99b621ebd077800ca243b3dd4a/lib/src/core/components/EntityCollectionTable/EntityCollectionTable.tsx#L303) if collection.properties have map object, for example address, it is not resolved. Also in getPropertyInPath it is not resolved.

mudassirmaroof commented 11 months ago

@mvarchdev @fgatti675 We are facing the same issues, when can we expect this to be merged in ?

fgatti675 commented 7 months ago

Hi guys, this code is revamped in v3 and working fine, I encourage you to try the new version :)