Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Special Cells #21

Open
adam-rocska opened this issue May 16, 2023 · 5 comments
Open

Feature Request: Special Cells #21

adam-rocska opened this issue May 16, 2023 · 5 comments

Comments

@adam-rocska
Copy link

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
Copy link

toddpadwick commented May 24, 2023

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
Copy link

pm0u commented Jun 6, 2023

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

@Designer023
Copy link

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
Copy link

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
Copy link

doublejosh commented Jun 24, 2024

@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: #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants