Material-ui: [Select] can't disable underline with inputProps

Created on 12 Nov 2019  路  3Comments  路  Source: mui-org/material-ui

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

I can't pass the prop 'disableUnderline' to the Input component inside Select. It returns a warning 'React does not recognize the disableUnderline prop on a DOM element'.

Expected Behavior 馃

I assume it should be possible to override the styling of the underline class in Input when using the Select component, but currently it doesn't work this way.

Steps to Reproduce 馃暪

<Select inputProps={{ disableUnderline: true }}></Select>

  1. Open codesandbox example
  2. Check the Input underline is still visible even though the prop disableUnderline is passed.

Your Environment 馃寧

| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.5.2 |
| React | v16.9.0 |
| Browser | |
| TypeScript | |
| etc. | |

support

Most helpful comment

@otalrecall Try this:

<Select disableUnderline>

All 3 comments

馃憢 Thanks for using Material-UI!

We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.

For support, please check out https://material-ui.com/getting-started/support/. Thanks!

If you have a question on StackOverflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.

@otalrecall Try this:

<Select disableUnderline>

@otalrecall Try this:

<Select disableUnderline>

This worked for me. Strange this is that the inputProps as described in Select API documentation - https://material-ui.com/api/select/, is supposed to pass the property to underlying input component. Document on https://material-ui.com/api/input/ acknowledges the use of this property.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sys13 picture sys13  路  3Comments

activatedgeek picture activatedgeek  路  3Comments

newoga picture newoga  路  3Comments

TimoRuetten picture TimoRuetten  路  3Comments

ghost picture ghost  路  3Comments