File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
apps/webapp/app/components/primitives Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -298,19 +298,17 @@ export const Button = forwardRef<HTMLButtonElement, ButtonPropsType>(
298298 const innerRef = useRef < HTMLButtonElement > ( null ) ;
299299 useImperativeHandle ( ref , ( ) => innerRef . current as HTMLButtonElement ) ;
300300
301- if ( props . shortcut ) {
302- useShortcutKeys ( {
303- shortcut : props . shortcut ,
304- action : ( e ) => {
305- if ( innerRef . current ) {
306- innerRef . current . click ( ) ;
307- e . preventDefault ( ) ;
308- e . stopPropagation ( ) ;
309- }
310- } ,
311- disabled,
312- } ) ;
313- }
301+ useShortcutKeys ( {
302+ shortcut : props . shortcut ,
303+ action : ( e ) => {
304+ if ( innerRef . current ) {
305+ innerRef . current . click ( ) ;
306+ e . preventDefault ( ) ;
307+ e . stopPropagation ( ) ;
308+ }
309+ } ,
310+ disabled : disabled || ! props . shortcut ,
311+ } ) ;
314312
315313 return (
316314 < button
You can’t perform that action at this time.
0 commit comments