-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't search for some genera or families in 'choose a genus/family' bar #62
Comments
tough one. any idea if this missing genera thing is only for the select a lat/long? Or does it should up for the pre-loaded kml's also? |
pre-loaded KMLs too |
what's an example? |
i think i found a bug in the circle code that's not updating the genus/family lists as you move around and you get the last preloaded kml genus list (e.g. still getting the fowler genus list), but if it's in the preloaded kml's too then there is a deeper issues. |
Sparganium is unsearchable for all of them |
we have to do some kind of spatial subset of genera or else it crashes the whole app because of allowing too many choices... |
I don't know if this solves the problem at all, but what if the only option in the dropdown menu was 'all', and then you could also search in it to retrieve a single genus? Just remove all the other genera from being displayed, would that help? Same thing for family menu |
not sure if it's possible within this https://selectize.dev/docs/usage. let's discuss at the next meeting |
right now we're doing (4), and we definitely have the problem that the robot mentions at the end.... |
when I just ran the app locally, this is now broken again. For some of the preloaded places, I can't search for any genera or families |
arggg, it's fine on my mac, but i can get the bug on the windows machine... |
it's weird as well because I tested for one preloaded place, couldn't search for anthing -> swapped to another place, could search for a genus that I tested --> swapped back to the first place and that single genus was now on the list along with 'all'. So something convoluted going on |
yup, i have the same--something not updating properly when you switch places. |
The issue you're facing with When a user event triggers changes, some reactive computations may not finish before others are executed, leading to the described behavior. Here's a solution using
# Initialize a reactive value
data_ready <- reactiveVal(FALSE)
intersect_data <- reactive({
#... your existing code ...
# Set data_ready to true once the computation finishes
data_ready(TRUE)
return(data)
})
observe({
if (data_ready()) {
# Reset the reactive value
data_ready(FALSE)
updateSelectizeInput(
session,
"taxa_genus",
selected = "All",
choices = update_genus_choices(input$place),
server = TRUE
)
updateSelectizeInput(
session,
"taxa_family",
choices = update_family_choices(input$place),
selected = "All",
server = TRUE
)
}
}) This way, the input updates will only occur after However, another way to handle this is by directly integrating the Lastly, ensure you don't have other reactivity chains that might cause premature triggers. The Shiny reactive system is quite powerful, but it's essential to be mindful of the order and dependencies between reactive elements. |
The text was updated successfully, but these errors were encountered: