I have a relatively simple app with two radioGroupButtons
radioGroupButtons('rng1', label = 'Select metric',
choices = c('A', 'B', 'C' ),
selected = 'A', justified = TRUE)
radioGroupButtons('rng2', label = 'Select metric',
choices = c('A', 'B', 'C' ),
selected = 'A', justified = TRUE)
I was trying to build a reactivity around observe() or observeEvent() where the reactivity is triggered only when both have changed but it doesn't work.
So in an example such as below (tried many others)
observe({
req(input$rng1, input$rng2)
print('both changed')
})
this triggers when only 1 changes. I need it to print only when both values were changed.
I believe there must be a very basic solution but am unable to find it.
Thank you for the help