Closed afercia closed 7 years ago
So, the way to do this properly is to hook into the onSubmit
of the form
that the elements belong to. This form
should be inside the QuickEdit
component.
However, right now in the regular WordPress output, there's a single mega-form that wraps the entire table.
Do you forsee any potential problems from moving the form
element into the QuickEdit
component?
Hm I think the mega-form in core is there to handle also the search, bulk-actions, selects to filter by type (and in other list tables by date, category, etc.). Since everything works differently here, it should be safe?
That was my figuring, just wanted to check there wasn't an accessibility reason or anything I was missing. :)
One of the native form behaviors is that form submission happens also when pressing the Enter key on some form elements, for example on input fields.
The QuickEdit saving should correctly replicate this native behavior, e.g. when using a keyboard and pressing Enter while the Name, Email, or URL fields are focused.