fix(striker-ui): pass input values to submit append in GateForm
This commit is contained in:
parent
305968e5e9
commit
7f826132a4
@ -96,8 +96,21 @@ const GateForm = forwardRef<GateFormForwardedRefContent, GateFormProps>(
|
||||
|
||||
setMessage(MSG_ID_GATE_ACCESS);
|
||||
setIsSubmitting(true);
|
||||
|
||||
const { target } = event;
|
||||
const { elements } = target as HTMLFormElement;
|
||||
|
||||
const { value: identifierValue } = elements.namedItem(
|
||||
INPUT_ID_GATE_ID,
|
||||
) as HTMLInputElement;
|
||||
const { value: passphraseValue } = elements.namedItem(
|
||||
INPUT_ID_GATE_PASSPHRASE,
|
||||
) as HTMLInputElement;
|
||||
|
||||
onSubmitAppend?.call(
|
||||
null,
|
||||
identifierValue,
|
||||
passphraseValue,
|
||||
(message?) => {
|
||||
setMessage(MSG_ID_GATE_ACCESS, message);
|
||||
},
|
||||
|
2
striker-ui/types/GateForm.d.ts
vendored
2
striker-ui/types/GateForm.d.ts
vendored
@ -10,6 +10,8 @@ type GateFormMessageSetter = (
|
||||
type GateFormSubmittingSetter = (value: boolean) => void;
|
||||
|
||||
type GateFormSubmitHandler = (
|
||||
identifier: string,
|
||||
passphrase: string,
|
||||
setMessage: GateFormMessageSetter,
|
||||
setIsSubmitting: GateFormSubmittingSetter,
|
||||
...args: Parameters<DivFormEventHandler>
|
||||
|
Loading…
Reference in New Issue
Block a user