Submitted over 3 years ago
Tip Calculator using Vanilla JS, CSS Grid and Flexbox
@pndmhs
Design comparison
SolutionDesign
Solution retrospective
Any feedback or suggestion would be appreciated :)
Community feedback
- @ChamuMutezvaPosted over 3 years ago
- my expectation was that when i select any button as long as the bill and number of people are valid inputs, then the calculations should be done and displayed. If i put the bill as
100
and number of people as1
and then select the rate buttons nothing happens, the change only comes when i change the bill or the number of people. - the checked attribute can be set to false by looping the radio buttons when the custom input has been selected
1@pndmhsPosted over 3 years ago@ChamuMutezva 1. Sorry, you're right, it doesn't change when you click the rate button. I will fix it
- Oh yeah you're right, I didn't think of it. Thanks !
0 - my expectation was that when i select any button as long as the bill and number of people are valid inputs, then the calculations should be done and displayed. If i put the bill as
- @ChamuMutezvaPosted over 3 years ago
- the calculator is not working as expected. When the bill and number of people are filled in and then select the buttons nothing changes. Changes only happens when the number of people and bill has been changed.
- i would have used a
radio button
instead of a checkbox, since a radio button can only allow one element to be checked at a particular time. - negative values are giving me results
1@pndmhsPosted over 3 years ago@ChamuMutezva
-
Are you sure? It works fine for me.
-
When you want to input custom tip you need to uncheck the tip options. I don't know if radio button can be unchecked so I used checkbox instead.
-
Oh thanks for letting me know, I forgot to test the negative number so it didn't excluded in the calculation.
Anyway thanks for the feedback. I appreciate it very much
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord