File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
app/gui/src/dashboard/components/AriaComponents/Button Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -142,19 +142,19 @@ export function Button<IconType extends string>(propsReplacement: ButtonProps<Ic
142
142
} , [ isLoadingFinal , loaderPosition ] )
143
143
144
144
const handlePress = useEventCallback ( ( event : aria . PressEvent ) : void => {
145
- setImplicitlyLoading ( async ( ) => {
146
- if ( ! isDisabled ) {
147
- const result = onPress ?.( event )
145
+ if ( ! isDisabled ) {
146
+ const result = onPress ?.( event )
148
147
149
- if ( result instanceof Promise ) {
148
+ if ( result instanceof Promise ) {
149
+ setImplicitlyLoading ( async ( ) => {
150
150
await result
151
- }
151
+ } )
152
+ }
152
153
153
- if ( dialogContext != null && 'formMethod' in props && props . formMethod === 'dialog' ) {
154
- dialogContext . close ( )
155
- }
154
+ if ( dialogContext != null && 'formMethod' in props && props . formMethod === 'dialog' ) {
155
+ dialogContext . close ( )
156
156
}
157
- } )
157
+ }
158
158
} )
159
159
160
160
const styles = variants ( {
You can’t perform that action at this time.
0 commit comments