htmx
htmx copied to clipboard
Edit Row example allows editing multiple rows when popup dismissed
Minor issue in the Edit Row example. This example explicitly has a pop up to prevent editing multiple rows simultaneously, with a pop up if a second row is edited before the first has been saved. While this works to reset the first row if the second is edited, when the pop up is canceled it instead allows editing the second row without resetting the first, leaving two editable rows. Example video below.
It should probably be:
if(result.isConfirmed) {
htmx.trigger(editing, 'cancel')
htmx.trigger(this, 'edit')
}
As long as "this" does not change its reference. No JS guy.