Page:: edit_fk()

The method permits a user to edit the foreign key field that matches the given button. The function is asynchronous as it waits for the user to select a new entry from the foreign key table's crud page.

Description

The target is a HTMLButtonElement expected to be the input clicked on.

The below stops the current event from being clicked on

Get the crud page's administration parameters using the button

Using the acquired admin parameters, create a new crud page from the current page.

Wait for the user to collect the crud operation results. if the user aborts the administration, the result becomes undefined.

Don't forget to restore the current crud page as listeners depend on it.

If the user aborts, no update is required . Otherwise if the result is defined, use the result to update the current(mother) page.