Skip to content

using components in DataTable cells #1686

Discussion options

You must be logged in to vote

Hello, there is currently a way to add anything within DataTable cells via the named slot cell.

Docs: https://carbon-components-svelte.onrender.com/components/DataTable#slotted-cells
Example: https://svelte.dev/repl/d5ad7e17e80c4637856e5026a656c0a6?version=3.56.0

A current limitation is the presence of slotted content will not remove the cell's padding, but with css :has it should be achievable. Note that :has isn't yet supported in Firefox.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gabrielleecredera
Comment options

Answer selected by gabrielleecredera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants