Add image or icon in table action

Hi everyone,

I can't figure any clean trick in order to put some SVG, or fontawesome icon in a table action.
Currently, I put some emojis but it isn't good enough.

image

Thanks,

Erwan

Hey @Erwan,

I haven't tried it but you should be able to leave the action titles blank and add an inline-svg / icon / custom image via CSS targeting only the buttons in that specific table.

I don't think it's otherwise possible.

Yess, totally doable.

(add the below to your app styles)

/*
// - rt-table-{{tableId}}
// - nth-child(x) is selecting the xth button
*/

#rt-table-table1 .table-cell-action button:nth-child(2) {
  background: url(https://www.svgrepo.com/show/88909/round-help-button.svg);
  background-size: 20px auto;
  background-repeat: no-repeat;
  background-position: center;
  padding: 0 15px;
}

Screenshot 2022-02-22 at 18.49.21

2 Likes

Thanks for your answer,

Yes basically I need to code it, I was just searching for something a bit lighter.
Otherwise I'll do it in js, but I don't like adding too much of my own code in retool.

Regards,
Erwan.

Genius !!
Thanks a lot !!

1 Like


I have wriiten the same, but doesn't seems to work. what's work in this

Hey @ishi8,

seems like you only have one button in that row. Can you delete :nth-child(2) and try again?