Click Cell Event When Column is Empty

The click cell even handler doesn't seem to be working if the cell is empty. Is this a bug or a feature? Regardless that is something I am trying to do :slight_smile:
CleanShot 2023-09-20 at 23.21.45

I think it should be a bug.
I have report it here several days ago.

1 Like

:disappointed: We'll post here when we have a fix for this bug!

1 Like

I share others' concerns in re this. Are any updates available? If not then I plan to replace each empty cell with a clickably-sized target such as "None" or "No frigging data here".

1 Like

would just a single space work so you can keep it visually empty?

I don't think so. Retool seems to strip white space from cell contents.

thats a bummer, I just noticed that the click event is never triggered only if the cell is not editable.... you can dynamically set editable to something like:
{{ typeof item === 'string' ? false : true }}
image

this way if the cell has a value it remains locked and if it's null it becomes editable and clickable. in the click event you can add a JS Script to set the editable property to false if you want to avoid the interaction so the blinking cursor doesn't appear

1 Like

This is still in our backlog :disappointed: It's something we want to fix, but haven't been able to prioritize yet

1 Like

Goodness, a long moment of second-guessing myself until I found this topic.

Modal columns in the legacy table would helpfully display in the cell when there was no value to display, and rather importantly, they would remain clickable. (In fact, IIRC, any empty cell of any column type in the legacy table would display )

In the new table, I tried button column, link column, tags column … none of them are clickable if the cell is empty. IMO, at the very least, an empty cell in a button column should still display a button, rather than no button at all. Perhaps a toggle for "show button for empty cells." Sometimes the fact that a button has no text can be just as purposeful as a button with text, depending on the context.

I am now using a button column, and have augmented its value code to display (and thus a clickable button) rather than an unclickable empty cell . Now we can open the modal to add Director(s) if there isn't one.

Any updates on this bug?

Hi @utkarshwork,

I checked the ticket at the engineering team marked the ticket as being completed.

Are you still experiencing this issue? If so, could you share a screen recording of the behavior?

I’m using retool cloud and I’m seeing this too. There’s already data in our db so I can’t share a screen recording unfortunately.

Currently I’m working around this by checking if item is empty

image

{{ item||"-"}}

Hey @dakes - I know others have mentioned a similar approach, but I'll mark your post as a functional workaround until we have something more official in place.

The decision to not trigger onClick event handlers when clicking on whitespace is an intentional - but fairly contentious - one that is fittingly centered around the Button column type. Prior to this change, clicking outside the contained button but within the bounds of the cell itself would still trigger the onClick event, which was undesirable.

On a completely separate note, the new app builder that we recently released into public beta unlocks almost limitless customization and makes small tweaks like this trivial. I'd be interested in getting your thoughts, if you want to give it a try!

1 Like

On a completely separate note, the new app builder that we recently released into public beta unlocks almost limitless customization and makes small tweaks like this trivial. I'd be interested in getting your thoughts, if you want to give it a try!

Could you elaborate on the LLM part of the description? It seems like it is LLM first, which I’m wary about. Does LLM first mean “only LLM”, or can I use it without a LLM?

Since we are soon launching v1 of our app I’m not able to experiment as much as I’d like to.

Right now the building experience is entirely driven by LLM prompting, but we have plans to enable manual, deterministic editing of various component properties. It's definitely worth exploring after your v1 launch!