@@ -14,13 +14,13 @@ import {ButtonContext, LinkButtonContext} from './Button';
1414import { ContextValue , Provider , SlotProps } from 'react-aria-components' ;
1515import { createContext , forwardRef , ReactNode , useCallback , useRef } from 'react' ;
1616import { DOMProps , DOMRef , DOMRefValue } from '@react-types/shared' ;
17+ import { filterDOMProps , useLayoutEffect , useValueEffect } from '@react-aria/utils' ;
1718import { getAllowedOverrides , StyleProps } from './style-utils' with { type : 'macro' } ;
1819import { style } from '../style' with { type : 'macro' } ;
1920import {
2021 useDOMRef ,
2122 useResizeObserver
2223} from '@react-spectrum/utils' ;
23- import { useLayoutEffect , useValueEffect } from '@react-aria/utils' ;
2424import { useSpectrumContextProps } from './useSpectrumContextProps' ;
2525
2626interface ButtonGroupStyleProps {
@@ -112,7 +112,8 @@ export const ButtonGroup = forwardRef(function ButtonGroup(props: ButtonGroupPro
112112 orientation = 'horizontal' ,
113113 align = 'start' ,
114114 children,
115- isDisabled
115+ isDisabled,
116+ ...otherProps
116117 } = props ;
117118
118119 let [ hasOverflow , setHasOverflow ] = useValueEffect ( false ) ;
@@ -165,6 +166,7 @@ export const ButtonGroup = forwardRef(function ButtonGroup(props: ButtonGroupPro
165166 let context = { styles : style ( { flexShrink : 0 } ) , size, isDisabled} ;
166167 return (
167168 < div
169+ { ...filterDOMProps ( otherProps ) }
168170 ref = { domRef }
169171 style = { props . UNSAFE_style }
170172 className = { ( props . UNSAFE_className || '' ) + buttongroup ( {
0 commit comments