Skip to content

[Rating] Component hover state gets stuck #18939

@mlake

Description

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

Current Behavior 😯

Multiple Star components are rendered on-screen. Hovering without clicking seems to make some of them stay highlighted.

Expected Behavior 🤔

Should not be filled in unless clicked.

Steps to Reproduce 🕹


<DialogContent>
                  {ScoreNames.map((name, idx) => {
                    return (
                      <div key={idx}>
                        <div
                          className={clsx(classes.scoreName, {
                            [classes.validationError]:
                            submitCount > 0 && errors[name]
                          })}
                        >
                          {t("score-" + name)}
                        </div>
                        <StyledRating
                          name={name}
                          value={parseInt(values[name])}
                          onChange={handleChange}
                          disabled={isSubmitting}
                          size={"medium"}
                          max={10}
                          emptyIcon={<StarBorderIcon fontSize="inherit"/>}
                        />
                      </div>
                    );
                  })}

Context 🔦

Just trying to give people a way to leave ratings..

Your Environment 🌎

I'm using them in a dialog.

ezgif com-video-to-gif (2)

Tech Version
Material-UI v4.8.0
Material-labs v4.0.0 alpha 36
React v16.12.0
Browser chrome
TypeScript nope
etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGreat for first contributions. Enable to learn the contribution process.scope: ratingChanges related to the rating.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions