Describe the bug
When @react-awesome-query-builder/mui is used with Material UI v9 (@mui/material@9.x), the MUI Autocomplete value widget throws at render time:
TypeError: Cannot read properties of undefined (reading 'endAdornment')
in ForwardRef(Autocomplete)
This takes down the whole query builder (only caught by a surrounding error boundary) as soon as a rule with an Autocomplete-based value widget is shown.
To Reproduce
- Install
@react-awesome-query-builder/mui@6.6.15 with @mui/material@9.1.1 (React 19).
- Render
<Query ... /> with a config that produces an Autocomplete value widget (e.g. a multiselect field, or an autocomplete/async-search widget).
- The Autocomplete crashes on first render with the error above.
Expected behavior
The Autocomplete value widget renders normally.
Root cause
In modules/widgets/value/MuiAutocomplete.jsx, the renderInput callback reads params.InputProps.endAdornment and passes InputProps / inputProps to <TextField>:
const renderInput = (params) => (
<TextField
variant="standard"
{...params}
inputProps={{ "aria-label": ariaLabel, ...params.inputProps, value: renderValue }}
InputProps={{
...params.InputProps,
readOnly: readonly,
endAdornment: (
<React.Fragment>
{isLoading ? <CircularProgress color="inherit" size={20} /> : null}
{params.InputProps.endAdornment}
</React.Fragment>
),
}}
...
/>
);
Material UI v9 changed the Autocomplete renderInput(params) shape: the input props now live under params.slotProps.input (and params.slotProps.htmlInput) — params.InputProps / params.inputProps no longer exist. In addition, TextField removed the InputProps / inputProps props in favor of the slots / slotProps API. So params.InputProps is undefined, and reading .endAdornment on it throws.
The other value widgets (MuiText, MuiNumber, etc.) pass InputProps as a TextField prop; under v9 those props are silently ignored, so those widgets don't crash but lose their adornments / readOnly state.
Environment
@react-awesome-query-builder/mui: 6.6.15
@mui/material: 9.1.1
- React: 19
- Browser: Chrome
Additional context
Related to #1298 (Support for MUI 7): RAQB declares @mui/material peerDependency "^5.2.4 || ^6.0.0", so MUI 7/8/9 are unsupported. This issue documents the concrete runtime break under v9 (the Autocomplete/TextField slot-API migration), which is distinct from the install/peer-dependency aspect tracked in #1298. Happy to open a PR migrating the MUI value widgets' renderInput to the v9 slotProps API if that would be welcome.
Describe the bug
When
@react-awesome-query-builder/muiis used with Material UI v9 (@mui/material@9.x), the MUI Autocomplete value widget throws at render time:This takes down the whole query builder (only caught by a surrounding error boundary) as soon as a rule with an Autocomplete-based value widget is shown.
To Reproduce
@react-awesome-query-builder/mui@6.6.15with@mui/material@9.1.1(React 19).<Query ... />with a config that produces an Autocomplete value widget (e.g. a multiselect field, or an autocomplete/async-search widget).Expected behavior
The Autocomplete value widget renders normally.
Root cause
In
modules/widgets/value/MuiAutocomplete.jsx, therenderInputcallback readsparams.InputProps.endAdornmentand passesInputProps/inputPropsto<TextField>:Material UI v9 changed the
AutocompleterenderInput(params)shape: the input props now live underparams.slotProps.input(andparams.slotProps.htmlInput) —params.InputProps/params.inputPropsno longer exist. In addition,TextFieldremoved theInputProps/inputPropsprops in favor of theslots/slotPropsAPI. Soparams.InputPropsisundefined, and reading.endAdornmenton it throws.The other value widgets (
MuiText,MuiNumber, etc.) passInputPropsas aTextFieldprop; under v9 those props are silently ignored, so those widgets don't crash but lose their adornments /readOnlystate.Environment
@react-awesome-query-builder/mui: 6.6.15@mui/material: 9.1.1Additional context
Related to #1298 (Support for MUI 7): RAQB declares
@mui/materialpeerDependency"^5.2.4 || ^6.0.0", so MUI 7/8/9 are unsupported. This issue documents the concrete runtime break under v9 (the Autocomplete/TextField slot-API migration), which is distinct from the install/peer-dependency aspect tracked in #1298. Happy to open a PR migrating the MUI value widgets'renderInputto the v9slotPropsAPI if that would be welcome.