Skip to content

isArray on a column doesn't support key/value JSON #656

@osseonews

Description

@osseonews

We use JSONB columns alot in our database. For example, for variants on products, we have:

[
{ key: "color", value: "red" },
{ key: "size", value: "L" }
]

The isArray feature for Array Columns, though, treats it like an array of values, instead of like an Array of key/values. So when you edit it, you can just add a value, and not the key. So it's not useful for most applications, where the JSONB will be storing a key/value. In our React admin panel, we currently solve this with something called Nested Arrays from Mantine. You can see a demo here: https://mantine.dev/form/nested/#nested-arrays

Can you implement this for AdminForth also? It is really critical for JSONB fields, to be able to enter the Key/Value in this manner, otherwise, users are editing JSON, which is not very user friendly and prone to alot of errors.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions