Skip to content

Predefined columns/headers (Feature Request) #12

Open
@twiro

Description

@twiro

In my current project I use the table field as a kind of easier accessible replacement for the structure field, where every table column equals a single field in the structure field and every table row equals a single structure field entry.

In this scenario it would be super helpful, if the editors could only edit the table rows, but not the table columns/headers as editing, adding or changing headers/columns would actually break the expected data structure.

In the table blueprint a feature like this could be solved by a new columns-property that would accept an array of column names:

fields:
  table:
    type: table
    label: Table with predefined columns
    columns:
      - Column A
      - Column B
      - Column C

This setting would predefine the amount and header-titles of the columns, so no need to add additional column settings like maxColumns: 3 or minColumns: 3.

Regarding sorting, I would also love to have sortable rows but non-sortable columns in my use case, but it might be a more flexible solution if predefined columns wouldn't be automatically set to be non-sortable, but if the sorting property would simply become more flexible – this could be achieved by adding the following values to the sortable-property:

sortable: true (all)
sortable: rows
sortable: columns

I think with these additions the table field would become a lot more flexible and could be considered as a solution for quite some scenarios that can only be handled properly by the structure field (or subpages) at the moment.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions