firecmsco / firecms

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

Clicking on an entity in a collection group view shows an empty form #570

Closed faizanabidnaqvi closed 9 months ago

faizanabidnaqvi commented 10 months ago

Hi there!

I have been testing the collection group feature in firecms which is really useful! However, I found an issue with it.

When we set inlineEditing: false on a collectionGroup, clicking on the row of an entity in the table view opens a empty entity form. It opens properly only when we open the entity through the 'arrow icon' button on the left (left of the checkbox, first button in the row). The path shown in the address bar also seems to be incorrect.

In the screenshot below, I clicked on the row (not the arrow button) of an entity that has the title set to 'English title' but the form shows an empty title. The path shown is http://localhost:5173/c/locale/en-US when it should be http://localhost:5173/c/testDocs/flAzEev0jUq9G9YONPuX/locale/en-US. We are taken to the correct path only when opening it through the arrow button.

Screenshot 2023-10-12 at 4 11 46 PM

The collection group code is as follows:

const localeCollectionGroup = buildCollection({
    ...localeCollection,
    name: "Product locales group",
    description: "This is a collection group related to the locales subcollection of products",
    group: "Main",
    collectionGroup: true,
    inlineEditing: false,
    // textSearchEnabled: true,
})

The 'localeCollection' is as follows:

export const localeCollection = buildCollection({
    path: "locale",
    customId: locales,
    name: "Locales",
    singularName: "Locales",
    properties: {
        name: {
            name: "Title",
            validation: { required: true },
            dataType: "string"
        },
        selectable: {
            name: "Selectable",
            description: "Is this locale selectable",
            dataType: "boolean"
        }
    }
});
jackforesightmobile commented 10 months ago

Same issue here

fgatti675 commented 10 months ago

Thanks for the report, looking into this!

On Tue, Oct 17, 2023 at 11:51 AM jackforesightmobile < @.***> wrote:

Same issue here

— Reply to this email directly, view it on GitHub https://github.com/firecmsco/firecms/issues/570#issuecomment-1766069155, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHCCD65Y7M3STBJXLGFMVDX7ZIKRAVCNFSM6AAAAAA55TOSFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRWGA3DSMJVGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Camberi - Madrid, Munich, Milan

fgatti675 commented 10 months ago

Fixed in version 2.2.0-pre. Could you confirm this is working?

faizanabidnaqvi commented 10 months ago

Hi there! Thanks for the response.

I am still facing the same issue after updating to 2.2.0-pre.

fgatti675 commented 9 months ago

Fixed in version 2.2.0 :)