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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][LoadingButton] Make the href prop optional #41572

Closed
Chukwu3meka opened this issue Mar 20, 2024 · 2 comments
Closed

[material-ui][LoadingButton] Make the href prop optional #41572

Chukwu3meka opened this issue Mar 20, 2024 · 2 comments
Labels
component: LoadingButton The React component. package: material-ui Specific to @mui/material status: waiting for author Issue with insufficient information

Comments

@Chukwu3meka
Copy link

Chukwu3meka commented Mar 20, 2024

Steps to reproduce

  <LoadingButton
      variant="contained"
      loading={loading}
      sx={{ height: 43, px: 3 }}
      onClick={searchEndpoints}
      startIcon={<SearchIcon />}
      href="">
      Search
    </LoadingButton>

Current behavior

href is required in LoadingButton even though you can pass an empty string to it

Expected behavior

Add a question mark '?' to its interface to make it optional as no every button is a link and since this feature does not mandate href to be a truthy value

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.

Chrome latest
  Output from `npx @mui/envinfo` goes here.

  System:
    OS: Windows 11 10.0.22631
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.5 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (122.0.2365.92)
  npmPackages:
    @emotion/react: ^11.11.4 => 11.11.4
    @emotion/styled: ^11.11.0 => 11.11.0
    @mui/base:  5.0.0-beta.38
    @mui/core-downloads-tracker:  5.15.12
    @mui/icons-material: ^5.15.12 => 5.15.12
    @mui/lab: ^5.0.0-alpha.167 => 5.0.0-alpha.167       
    @mui/material: ^5.15.12 => 5.15.12
    @mui/material-nextjs: ^5.15.11 => 5.15.11
    @mui/private-theming:  5.15.12
    @mui/styled-engine:  5.15.11
    @mui/system: ^5.15.12 => 5.15.12
    @mui/types:  7.2.13
    @mui/utils:  5.15.12
    @types/react: ^18 => 18.2.47
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ^5 => 5.3.3

Search keywords: LoadingButton href

@Chukwu3meka Chukwu3meka added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 20, 2024
@Chukwu3meka Chukwu3meka changed the title Href required in LoadingButton [material-ui][LoadingButton] Href is required in Loading Button Mar 20, 2024
@zannager zannager added the component: LoadingButton The React component. label Mar 20, 2024
@danilo-leal danilo-leal added the package: material-ui Specific to @mui/material label Mar 20, 2024
@danilo-leal danilo-leal changed the title [material-ui][LoadingButton] Href is required in Loading Button [material-ui][LoadingButton] Make the href prop optional Mar 20, 2024
@ZeeshanTamboli
Copy link
Member

It doesn't error for me.

Please provide a CodeSandbox (https://material-ui.com/r/issue-template-latest), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve.

@ZeeshanTamboli ZeeshanTamboli added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 21, 2024
Copy link

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: LoadingButton The React component. package: material-ui Specific to @mui/material status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

5 participants