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

[Feature]: Allow text or int values #79

Open
jpSimkins opened this issue Feb 10, 2022 · 0 comments
Open

[Feature]: Allow text or int values #79

jpSimkins opened this issue Feb 10, 2022 · 0 comments

Comments

@jpSimkins
Copy link

jpSimkins commented Feb 10, 2022

It would be nice to allow text or int values for these instead of a double. Especially since you give the ability to change the icons used.

Also, perhaps not have it highlight all options below the selection too and only highlight the one selected could be very useful too.

The double is limiting the usage to only a rating system where it can easily be used for a quality system too.

For now, you can use a List and use the rating as an index (convert to int) to get the value but it's a little annoying.

e.g.

_qualityOptions = [
  {id: 'poor', name: 'Poor'},
  {id: 'fair', name: 'Fair'},
  {id: 'good', name: 'Good'},
];

// Get name
_qualityOptions[rating.round() - 1].name


// Get id
_qualityOptions[rating.round() - 1].id

While this isn't an important feature, I believe it could be used in a lot more ways if it wasn't restricted to a double.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant