Fixed the min/max range for when default value is 0 (previously stepper was disabled if default was 0)#107
Fixed the min/max range for when default value is 0 (previously stepper was disabled if default was 0)#107drohit wants to merge 2 commits intofacebookarchive:masterfrom
Conversation
…er was disabled if default was 0)
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
…eviously, stepper was disabled)
|
Signed up! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
The issue here is that with a zero default value and no explicit minimum and maximum, there's no way to know what an appropriate magnitude is for the value. Should it be from |
|
That makes sense. However, when dealing with the _FBTweakTableViewCellModeReal, this check is made and the minimum and maximum values were set to -1 and 1 respectively. I thought for consistency purposes, it would be nice to have that as the range for the _FBTweakTableViewCellModeInteger as well. Furthermore, as a user, when I used this, I was confused as to why it was disabled for my properties that were defaulted to 0. Perhaps I could implement an easy to use setMin/setMax for the user for maximum clarity? |
I set default value to 0 and noticed that I couldn't increment up or down. Noticed that this wasn't the case for floats, and so I applied the fix for _FBTweakTableViewCellModeInteger.