Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

'SliderInput' is not exported from '@mui/material/Slider' (imported as 'SliderInput') even though it is marked as exported from Slider.d.ts file #33992

Closed
2 tasks done
pieetrus opened this issue Aug 19, 2022 · 2 comments 路 Fixed by #34055
Labels
bug 馃悰 Something doesn't work component: slider This is the name of the generic UI component, not the React module!

Comments

@pieetrus
Copy link
Contributor

pieetrus commented Aug 19, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

Build fails and return error export 'SliderInput' (imported as 'SliderInput') was not found in '@mui/material/Slider' (possible exports: SliderMark, SliderMarkLabel, SliderRail, SliderRoot, SliderThumb, SliderTrack, SliderValueLabel, default, sliderClasses)

Expected behavior 馃

Build should not fail and SliderInput should be exported

Steps to reproduce 馃暪

Steps:

  1. npx create-react-app my-app
  2. cd my-app
  3. npm install @mui/material @emotion/react @emotion/styled
  4. npm start
  5. Try to export and use import Slider, { SliderInput } from "@mui/material/Slider";

Context 馃敠

Create SliderCustomComponent with CustomSliderInputCompnent.

Your environment 馃寧

Tech Version
Material-UI v5.9.3
React v18.2.0
Browser Chrome
@pieetrus pieetrus added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 19, 2022
@oliviertassinari oliviertassinari added the component: slider This is the name of the generic UI component, not the React module! label Aug 19, 2022
@michaldudak michaldudak self-assigned this Aug 22, 2022
@michaldudak michaldudak added bug 馃悰 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 24, 2022
@michaldudak
Copy link
Member

We don't export SliderInput from @mui/material. It should be removed from Slider.d.ts - this was likely omitted by mistake. Slider gets a plain input in its Input slot, so there's nothing to export.

Would you like to create a PR and remove the unnecessary export?

@pieetrus
Copy link
Contributor Author

Yes, sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 馃悰 Something doesn't work component: slider This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants