Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the other PR, this will be "length 0 or 1." We might as well add that text now.
Also, this should be
warning()
instead ofstop()
. This is because this function will typically be called from an observer, and if there's astop()
in an observer, it will stop the entire application -- and that could stop it for multiple users.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the logic implemented in the other PR, length 0 will be authorized: it will set all buttons to unselected, so I'm not sure about changing the test/text?
My choice for a
stop()
was that if you doupdateRadioButtons(session, "radio", selected = letters[5:10])
for example, nothing is happening.Error in the JS console:
Maybe another logic then would be to take the last element of
selected
then? This would match the behavior ofupdateSelectInput
:Or the first, then matching the behavior of
updateSliderInput
Which raises another question: shouldn't both behave the same way (i.e either taking the first or the last)?