File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/x-data-grid/src/hooks/utils Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ export function createUseGridApiEventHandler(registryContainer: RegistryContaine
5050
5151 if ( ! subscription . current && handlerRef . current ) {
5252 const enhancedHandler : GridEventListener < E > = ( params , event , details ) => {
53- if ( ! event . defaultMuiPrevented ) {
53+ // Check for the existence of the event once more to avoid Safari 26 issue
54+ // https://github.com/mui/mui-x/issues/20159
55+ if ( event && ! event . defaultMuiPrevented ) {
5456 handlerRef . current ?.( params , event , details ) ;
5557 }
5658 } ;
@@ -82,7 +84,9 @@ export function createUseGridApiEventHandler(registryContainer: RegistryContaine
8284 React . useEffect ( ( ) => {
8385 if ( ! subscription . current && handlerRef . current ) {
8486 const enhancedHandler : GridEventListener < E > = ( params , event , details ) => {
85- if ( ! event . defaultMuiPrevented ) {
87+ // Check for the existence of the event once more to avoid Safari 26 issue
88+ // https://github.com/mui/mui-x/issues/20159
89+ if ( event && ! event . defaultMuiPrevented ) {
8690 handlerRef . current ?.( params , event , details ) ;
8791 }
8892 } ;
You can’t perform that action at this time.
0 commit comments