#49147·material-ui

[Autocomplete] component crash when groupBy function is set after opening popup

Author: KariHeCreated Sep 16, 2026Updated Sep 17, 2026
Labelstype: bugscope: autocompletehas workaround

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/github-jun8thjs?file=src%2FApp.tsx
  2. Open autocomplete input, so that popup is open
  3. Click checkbox to enable grouping

Current behavior

Application crashes with error Cannot read properties of undefined (reading 'map')

Expected behavior

Menu items in popup should be grouped or popup is closed without crash. This is not causing crash on version 6.x.

Context

We want dynamically set autocomplete input option grouping. In our application grouping is enabled depending on other context that selections from this input can influence. We group autocomplete search values based on that if they are part of current selected context or not.

Your environment

npx @mui/envinfo
  System:
    OS: macOS 26.6.2
  Binaries:
    Node: 26.5.0 - /Users/xxx/.nvm/versions/node/v26.5.0/bin/node
    npm: 11.17.0 - /Users/xxx/.nvm/versions/node/v26.5.0/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 152.0.7977.84
    Edge: Not Found
    Firefox: Not Found
    Safari: 26.6.2
  npmPackages:
    @base-ui/utils:  0.3.2 
    @emotion/react:  11.14.0 
    @emotion/styled:  11.14.1 
    @mui/core-downloads-tracker:  9.4.0 
    @mui/icons-material:  9.4.0 
    @mui/lab:  9.0.0-beta.9 
    @mui/material:  9.4.0 
    @mui/private-theming:  9.4.0 
    @mui/styled-engine:  9.4.0 
    @mui/system:  9.4.0 
    @mui/types:  9.4.0 
    @mui/utils:  9.4.0 
    @mui/x-data-grid:  9.13.0 
    @mui/x-data-grid-premium:  9.13.0 
    @mui/x-data-grid-pro:  9.13.0 
    @mui/x-date-pickers:  9.13.0 
    @mui/x-date-pickers-pro:  9.13.0 
    @mui/x-internal-exceljs-fork:  5.0.0 
    @mui/x-internals:  9.13.0 
    @mui/x-license:  9.13.0 
    @mui/x-telemetry:  9.13.0 
    @mui/x-tree-view:  9.13.0 
    @mui/x-virtualizer:  0.7.1 
    @types/react:  18.3.29 
    react:  18.3.1 
    react-dom:  18.2.0 
    typescript: ^5.8.3 => 5.9.3 

Search keywords: autocomplete grouping