Skip to content

[material-ui][OutlinedInput] OutlinedInput spreads all props into html dom as invalid html attributes #47549

@honzanemecek

Description

@honzanemecek

Steps to reproduce

Open this link to live example: https://codesandbox.io/p/github/honzanemecek/mui-outlined-input-bug/main

Steps:

  1. Extend OutlinedInputProps via theme
  2. Apply the prop on OutlinedInput element
  3. Look into the console - warning of incorrect DOM props appears

Current behavior

This is the error that appears:
Image

Expected behavior

Prevent invalid props to be passed to html element as html attributes.

Context

No response

Your environment

npx @mui/envinfo
    System:
    OS: macOS 26.0.1
  Binaries:
    Node: 22.20.0 - /Users/honzanemecek/.nvm/versions/node/v22.20.0/bin/node
    npm: 10.9.3 - /Users/honzanemecek/.nvm/versions/node/v22.20.0/bin/npm
    pnpm: 10.22.0 - /Users/honzanemecek/.nvm/versions/node/v22.20.0/bin/pnpm
  Browsers:
    I'm using Brave.
    
    Brave: 1.83.120


    Chrome: Not Found
    Edge: Not Found
    Firefox: Not Found
    Safari: 26.0.1

Search keywords: input mui material-ui outlinedInput spread props

Metadata

Metadata

Assignees

Labels

scope: inputChanges related to the input.status: waiting for maintainerThese issues haven't been looked at yet by a maintainer.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions