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
rate-component value #8422
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem does this feature solve?
It would be great if we could configure the starting value of the rate component or pass all the values that we want for each character.
i.e. lets say that we have a rate component with negative values, -3, -2, -1, 0, 1, 2, 3
with current api we can achieve only the presentation of those numbers but the values will be the following: 1, 2, 3, 4, 5, 6, 7
so for example, if user selects -3 the value will be 1 etc.
What does the proposed API look like?
The proposed api based on the example above could be implemented with 2 ways:
nzStartingValue
which will determine what the first value is for the rate componentso based on the above example would be
the default value for
nzStartingValue
would be1
to have backward compatibility.Also notice that index follows the nzStartingValue
nzValues
i.e. the above scenario would be writter as:
That solution could provide us more flexibility such as passing even strings as values i.e. ['bad', 'good', 'excellent'] etc.
Also based on nzValues we could omit nzCount as we would be able to compute nzCount from nzValues.
Last but not least we sould provide the value to the
nzCharacter
templateConclusion
nzStartingValue
provides more simplicity whilenzValues
provides more flexibility.The best outcome would be to have both these options.
The text was updated successfully, but these errors were encountered: