Can table cells just contain an icon? #3356
-
Is it possible to render icons inside column cells without having any other corresponding data that's coming from the source the table's pulling from for the other table values? I'm just trying to make a column of right-facing arrows at the end of each row. FWIW, this additional column is supposed to have a blank header. The following is how I'm currently trying to implement it, which is causing an
Could someone please explain how I could go about doing what I'm trying to accomplish? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Yes it is possible, infact I have added custom buttons for CRUD operations as well |
Beta Was this translation helpful? Give feedback.
-
@lilfrootyloops the problem is the If you moved that With that being said that does not really solve your problem. Perhaps you wanted a The first thing I would do is make a component that accepts those three enums and returns one of those emojis per enum. Something like this:
Then you need to wire up you columns something like this:
This way the cell gets both a header title and a id via the CC: @JoseSNubimetrics this might be what you are looking for as well 🙂 |
Beta Was this translation helpful? Give feedback.
@lilfrootyloops the problem is the
Cell
func is in an object by its self when it does in fact need aheader
andaccessor
prop as well. Theaccessor
is used as theid
if I am not mistaken.If you moved that
Cell
func into thelastName
object thelastName
value would be just that one emoji.With that being said that does not really solve your problem. Perhaps you wanted a
status
column that took in props ofyes
,no
, andmaybe
which you wanted to resolve as a ✅ , ❌ , and ❓.The first thing I would do is make a component that accepts those three enums and returns one of those emojis per enum.
Something like this: