Closed nickryall closed 9 years ago
+1 wow this is great
+1
@nickryall wanna take a stab at adding to the readme then I'll merge!
Sorry guys. You might need to take another look at this. I've made some updates to prevent the UI ever getting to a state where there is an option selected but the value of the view is set to undefined
.
The clear and reset methods will now fall back to selecting the first available option
if there is no unselectedText
or initial value
set. I've updated the readme to document this behaviour.
@nickryall, not sure if you saw, but bear updated the travis sauce credentials. If you merge upstream/master
into your feature branch and push a frivolous commit, hopefully the credentials will be zen :)
Ok. I've made the suggested changes with a quick test included for the clear
method with empty options
.
I also realised that an uncaught error was thrown if no options
were passed in ( expects at least an empty array or collection ) so I added a check for that.
The latest travis.yml is in the commit but still no joy.
hey @nickryal, your new commits look good too. this test may not be desirable per our parallel discussion. Also, I like your opts.options
validation, but you're missing [[1, 2]] case, and even then, we won't verify all of the contents' validity. I think closing 5 via my PR may cover this sufficiently enough?
+1, tests passing
@cdaringe Thanks for taking a look. Yep I'll remove that test based on the new behaviour in #36 . Perhaps it would make more sense to merge #36 first then I'll re-base and update this PR accordingly. I think some of my changes will be redundant after that anyway, so I'll need to take some time to make sure it all fits with the new direction.
Closing this one. I'll create separate PRs for the items that are still relevant. That way we won't get a bunch of unnecessary commits.
I had to make all of these changes at once to properly test all the use cases.
this
from render method for chaining purposesbeforeSubmit
method ( called by form view on submit )reset
method with tests ( #30 )clear
method