Automatic modal closure after button pressed on it

Firstly thank you so much Matthieu for all you work in the forum - unreal!
In relation to

<script>
document.addEventListener('DOMContentLoaded', () => {
  window.addEventListener('submit-form-success-form1', () => {
    window.parent.location.reload();
  });
});
</script>

Instead of form I wanted to use a list which in turn updated a record with Softr’s new action button.
I thought it would be a case of changing ‘submit-form-success-form1’ -but how wrong I was.

Are you able to give any guidance at all?

Many Thanks in advance!