mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-17 16:19:48 +02:00
Refactor form submissions to use startTransition for improved performance
This commit is contained in:
@@ -62,7 +62,8 @@ export function OrgLabelForm({
|
||||
<form
|
||||
id="org-label-form"
|
||||
className="flex flex-col gap-4 px-0.5"
|
||||
action={async () => {
|
||||
onSubmit={async (e) => {
|
||||
e.preventDefault();
|
||||
if (await form.trigger()) {
|
||||
onSubmit(form.getValues());
|
||||
}
|
||||
|
||||
@@ -211,7 +211,15 @@ export default function AlertRuleGraphEditor({
|
||||
|
||||
return (
|
||||
<Form {...form}>
|
||||
<form id={FORM_ID} action={formAction}>
|
||||
<form
|
||||
id={FORM_ID}
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
startTransition(() => {
|
||||
formAction();
|
||||
});
|
||||
}}
|
||||
>
|
||||
<SettingsContainer>
|
||||
<PaidFeaturesAlert tiers={tierMatrix.alertingRules} />
|
||||
<div className="flex flex-col lg:flex-row gap-6 lg:gap-8 items-start">
|
||||
|
||||
Reference in New Issue
Block a user