sanity-io / table

Table schema type and input component for Sanity Studio
MIT License
39 stars 11 forks source link

Feature Request: Special Cells #21

Open adam-rocska opened 1 year ago

adam-rocska commented 1 year ago

It'd be great to have row headers, column headers and footer row(s). Sure, most general CMS use cases should avoid using tables; but there are cases when it's inevitable.

Our use case for example is to have a Sanity Document type that represents a contract template. Non-Disclosure Agreements, Framework Agreements, etc. and all this multi-lingually. In such use cases it's better to have an Array<block|table> where table accepts headings.

I can imagine a lot of different use cases for such tables but hey, up to you folks ¯_(ツ)_/¯

toddpadwick commented 1 year ago

Yep, I could do with this too. We have a client who has lots of complex tables for organising data such as this one. We are building them a new site and they need table functionality that matches their existing CMS (magento). So this would require table headers, and portable text possibility. Tables are a common requirement for lots of content types so I was surprised that Sanity didn't have something out of the box.

Screenshot 2023-05-24 at 15 09 51

pm0u commented 1 year ago

+1 - why was this removed from v2? We want to have certain cells be links, would really love to have this included

Designer023 commented 6 months ago

Even just the ability to assign a row as a thead or a cell as a th would be great. That would cover 95% of use cases that I could need

Designer023 commented 6 months ago

A second thought would be a checkbox which allowed the first row to be a header, and a checkbox for first column.

I'll do this by wrapping the table in a document/object but it would be nicer if it was part of the actual component

doublejosh commented 4 months ago

@Designer023 You can create an object with a table field, then make whatever fields in the object you want.

I used the table type directly and am now stuck without the ability to create settings fields, etc. Now my question is if I can migrate that data without manually editing thousands of cell records.

More about this here: https://github.com/sanity-io/table/issues/19