File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,12 @@ import { cn } from "~/utils/cn";
33export function FormButtons ( {
44 cancelButton,
55 confirmButton,
6+ defaultAction,
67 className,
78} : {
89 cancelButton ?: React . ReactNode ;
910 confirmButton : React . ReactNode ;
11+ defaultAction ?: { name : string ; value : string ; disabled ?: boolean } ;
1012 className ?: string ;
1113} ) {
1214 return (
@@ -16,6 +18,17 @@ export function FormButtons({
1618 className
1719 ) }
1820 >
21+ { defaultAction && (
22+ < button
23+ type = "submit"
24+ name = { defaultAction . name }
25+ value = { defaultAction . value }
26+ disabled = { defaultAction . disabled }
27+ className = "hidden"
28+ tabIndex = { - 1 }
29+ aria-hidden = "true"
30+ />
31+ ) }
1932 { cancelButton ? cancelButton : < div /> } { confirmButton }
2033 </ div >
2134 ) ;
Original file line number Diff line number Diff line change @@ -984,16 +984,6 @@ function QueueOverrideConcurrencyButton({
984984 </ Paragraph >
985985 ) }
986986 < Form method = "post" onSubmit = { ( ) => setIsOpen ( false ) } className = "space-y-3" >
987- { /* Hidden button to capture Enter key for primary action */ }
988- < button
989- type = "submit"
990- name = "action"
991- value = "queue-override"
992- disabled = { isLoading || ! concurrencyLimit }
993- className = "hidden"
994- tabIndex = { - 1 }
995- aria-hidden = "true"
996- />
997987 < input type = "hidden" name = "friendlyId" value = { queue . id } />
998988 < div className = "space-y-2" >
999989 < label htmlFor = "concurrencyLimit" className = "text-sm text-text-bright" >
@@ -1013,6 +1003,11 @@ function QueueOverrideConcurrencyButton({
10131003 </ div >
10141004
10151005 < FormButtons
1006+ defaultAction = { {
1007+ name : "action" ,
1008+ value : "queue-override" ,
1009+ disabled : isLoading || ! concurrencyLimit ,
1010+ } }
10161011 confirmButton = {
10171012 < Button
10181013 type = "submit"
You can’t perform that action at this time.
0 commit comments