Prevent null values on tags in new table

Hello. I'm trying to do something very simple, I have two mapped options in a table cell where you can select one or two options, however you cannot leave it blank. Otherwise it would cause trouble in the system. But I don't see any options where you can do this behaviour.

image

There's this forum post where they recommend creating another column with a validation method so you cannot proceed with an update but that's not what I'm looking for. I just don't want for the option to be deselected on the first place if it's the only one.

1 Like

Hi @Carlos_Ortiz! If I understand correctly, you are hoping to prevent a user from deselecting a value in an editable "Tags" column only if it would result in zero total options being selected. Unfortunately, that isn't currently a native feature of the component. I will go ahead and put in a feature request for you, though! We'll be sure to update you whenever we hear anything further :slight_smile:

In the meantime, there doesn't seem to be a particularly great workaround. The best idea I have is to dynamically hide a mapped option if it is the only active tag for the currently selected row.

I'll continue to brainstorm potential short-tem fixes but hopefully we can get that feature rolled out before too long!

Thank you, I'm getting back to the problem yet again to see if I can find a solution at this time. But It would be very helpful.

But indeed, it would be great having the option that you cannot leave the tags blank. If you save the values like this it could cause an issue.

I could go around this by dealing with this on the update process but it would give mixed signs to the user by doing updates that are not really being implemented so it isn't either the intended solution. I'll be trying a dynamic mapping code based on the table values and the changesetArray to hide or show the respective values that are needed and see if I'm successful for the time being.

Hey @Carlos_Ortiz - thanks for following up. Let me know if you have any questions or challenges implementing a workaround.

I do know that our dev team has eyes on this request and is ready to move forward with it, so hopefully I'll have an update for you soon!

For the time being if the values are empty the row is set in red and the save button is disable. Is not the most elegant solution but it was the workaround that I found.

The other options didn't worked sadly, so I'm looking forward for the update :crossed_fingers: Thank you so much for the replies.

1 Like