Array data types in tables

One of the most common attributes that gets displayed in a table is an array. I really think that there should be an array tag type in Retool. Right now there isn't really a good alternative other than mark down and changing it to a string.

1 Like

If any one wants some easy tags this is what we ar using for now:

column type: html
Mapped Value :

<div style="display:flex; flex-wrap: wrap">
{{self.map(item => `<span 
style="
  background-color: lightgrey;
  color:black;
  padding: 3px 8px; 
  border-radius: 78px; 
  font-weight: 500;
  margin: 4px;"
>
  ${item}
</span>`).join(' ')}}
</div>
1 Like

We're working on this now actually! :wink:

1 Like

Do you have an approximate release date for this?

1 Like

Just asked the eng team working on this, will let you know once I hear back!

This should be available on our upcoming table version, which should be live by June of this year! In the meantime, if you're ready and willing to provide feedback, I may be able to get you enrolled in a beta even sooner :eyes: Let me know!

If it is possible to have it sooner, would be great.

Hello Victoria,
Is it possible to have the upcoming table version too ?
Many thanks,
Kind regards,
Sarah

Hey Sarah! Would you mind sending an email to victoria.campbell@retool-ba9e93d5caa4.intercom-mail.com with your Retool subdomain? Happy to get you set up :slight_smile:

Hello Victoria,
I've sent you an email !
Many thanks,
Have a nice day,
KR,
Sarah

Hi Sarah! I believe all Cloud accounts should now have the new table enabled :eyes: Do you see it in your org?

Hello Victoria,
I am curious if the new table includes an option for an edit column.
In the prior table version, I accomplished this by appending a custom column of the modal type, but it appears to be absent in the latest version.
Many thanks for your help,
Kind regards,
Sarah

Hey Sarah! This current iteration of our Table component has custom columns, but none of the type: Modal. You can, however, try this workaround!

  1. Add a custom column of type: Icon (or really any column that you can add some clickable text and an event handler to) and then add an event handler to Control component > modal1 > Open.
  2. In your modal1, hide it from the canvas by setting the Hidden field to true

In this modal, you can still reference table1.selectedRow.columnName (e.g. table1.selectedRow.id) :slight_smile: This should allow you to open a modal from the table component!

Let me know if you have any questions about this at all.

I'm getting a type error:
image
Any ideas how to fix this?

Hey there! Would you mind sharing a screenshot of the code that's resulting in that error?