Allow referencing {{ currentSourceRow }} within a table's action hidden parameter

Hi there,

Making toolbar items dynamically shown has shipped. We have not yet shipped the option to reference currentSourceRow in the actions hidden property :disappointed:, but we're still tracking requests internally

The current recommendation is to use the disabled property instead of hiding as disabling the button promotes a consistent UI and predicable usage for end users

@Tess I thought the hide option was already dynamic? It just couldn't reference the currentSourceRow.

Hi Shawn, correct! We are tracking requests to reference currentSourceRow in the hidden property

1 Like

@Tess So, the option was already dynamic before right? What I'm getting at is, it seems dynamically showing actions is being reported as new and just shipped. But, at the time I created this thread, it was already possible to do it so I'm not sure exactly what feature was just shipped.

For this case mentioned earlier in the thread:

The other workaround I thought of has a similar gotcha – if adding a toolbar button to trigger clearSelection(), there is no way to dynamically show/hide the button depending on whether a row is actually selected or not. So both workarounds are less than optimal (suggestions welcome). Thank you!

This is now possible. You can now show/hide the toolbar buttons:

+1

1 Like

+1 from me, as well.

I applaud the design principle of predictability, and it's one of the things I enjoy about Retool as a piece of software.

Often just disabling an action for a table works well, but with more complex use cases it can make things less clear.

I'd love to have a reminder about good UX practices, but having my hands tied is just frustrating and feels condescending.

1 Like

Thanks for sharing this perspective! Sharing with the team internally :slightly_smiling_face:

+1

+1

+1 from me as well.
I have this one table where you have two actions, one of which almost never applies. It feels much cleaner, when most of the users arent even aware that option exist, than when everyone is always reminded that there is an option that "never" can be used.
Since the label is only visible when the action is enabled, I can't even hint at what the action would do, thus further confusing users.

+1

+1. I would also like to use {{ currentSourceRow }} to define a cell's background color. I have a table with start_date and end_date columns. I would like to paint both of them green if today's date is between these dates. As of now, i can use {{ item }} to check the start_date (for example) but i still need access to use {{ currentSourceRow }} to check the end_date cell next to it.

If anyone knows another way to achieve this please let me know!

1 Like

Hi @NickDev I believe this should be doable if you're on Cloud & using the new (non-legacy) table component:

If you're on prem, you may need to upgrade to 3.8+

1 Like

Is it possible to allow hiding an action component within a table based on currentRow value?

@ttam_ei sadly, it is not yet. You can disable it using currentRow though

+1.. Definitely need this feature

+1

+1

any news about this? otherwise what's the use case for the hidden parameter, if you can't rely on that specific row?