Hide or disable row actions on add new row

@Tess Is there a way to hide or disable row action buttons for new rows which haven't yet been saved?

I'm using the new table compont to let users add, edit, and delete records in our database. When a user adds a new table row, the delete action button I've set up is visible and clickable and I'd prefer to disable or remove it. The delete relies on a record id which the row doesn't have since it hasn't been saved to the database yet.

I'm not seeing newly created, unsaved rows appear in currentRow which is what I was hoping to use. Any conditional I've tried in the disabled/hidden field for actions is ignored by newly created, not-yet-saved rows.

1 Like

:thinking: I'm not seeing a way to do this, but I'll put in a feature request

1 Like

Hi @Tess

I’m currently working on a project and ran into the same issue. Our QA tester pointed out that it’s quite confusing for users.

Would you mind taking another look to see if it’s possible to disable the action for new rows, or if there’s maybe a workaround available in the meantime?

Thanks!

3 Likes

Hi @JetzeJanssens,

Thanks for checking in

:thinking: It seems like you can use {{!currentRow}} or {{ table4.newRows.length===0 }}, but it will disable the action for all rows while the new row editor is open. Would that work for now?

Unfortunately, I haven't found a good way to hide the button in the new row

Hi @Tess,

I tried the options you suggested β€” both {{ !currentRow }} and {{ table4.newRows.length !== 0 }} β€” but unfortunately, they only affect the existing rows. The actions are still visible and active on the new row :grimacing:

Hmm that was working for me last week, but I am now seeing the same behavior as you are :disappointed: Sorry about that - I wish I had other ideas!

I'd like to find a solution for this as well.