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

Internal issue 2934 - Add elements to end of cells in IcDataTable #2847

Closed
ticket-sync bot opened this issue Dec 2, 2024 · 2 comments
Closed

Internal issue 2934 - Add elements to end of cells in IcDataTable #2847

ticket-sync bot opened this issue Dec 2, 2024 · 2 comments
Milestone

Comments

@ticket-sync
Copy link

ticket-sync bot commented Dec 2, 2024

Currently, ICDS doesn't allow right adornment elements to be added to cells in its data table without replacing the entire cell. This is a problem as we have to replace the entire cell and lose their in-built functionality, meaning we lose out on some accessibility & styling features.

Right now, ICDS has a lot of really nice stuff that lets us pass in values via the data array so that the content of the table is data driven, e.g. if we want to have the cell text be a link we can just pass in:

value: {
   data: "Thing(1234)",
   href: "/show/thing/1234"
}

Here, the table will automatically make that cell text a link because of the presence of the href prop. The same can be done for other things like icons, text emphasis, etc.

If it's necessary to replace the cell then it will require manually putting in other components where needed, and having to do extra processing around which rows have them. This will likely cause potential hassle and extra problems maintaining a table going forwards as the code gets messier.

A potential solution would be to have that slot available so that everything necessary can be passed in via the data, so that once it's done then it would just look like:

value: {
   data: "Thing(1234)",
   href: "/show/thing/1234",
   actionButton: <CopyButton />
}
@ticket-sync ticket-sync bot changed the title Internal issue 2934 Internal issue 2934 - Add elements to end of cells in IcDataTable Dec 3, 2024
@ad9242
Copy link
Contributor

ad9242 commented Dec 3, 2024

this ticket is blocked by \ is related to finding a solution to #2317

@ad9242
Copy link
Contributor

ad9242 commented Jan 16, 2025

done by external contributor

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

No branches or pull requests

1 participant