I'm looking into the Retool, currently, to use it for our dashboards and I found that setting value of Date Range component doesn't trigger dependent queries at all. Is it supposed to?..
I want to make helper buttons to quickly change range of dates:
The "30 Days" button has the following event handler:
The button works ok, i.e. it changes the values of the date range. But dependent queries aren't triggered. If I set date in the date range manually (by clicking on it and changing dates), it works OK ,i.e. the queries are triggered.
What code do you have as it relates to when the date is changed that the dependent queries are triggered when you change the date manually in the field and not using the button? I would need to see that code to have more context and hopefully help you.
I assume that the value of the text with the value of the date range should change when I'm clicking on the buttons "30 days", "90 days", not only when I change ranges in the date range manually.
I can share the app with the Retool team if it's necessary.
OK I see what the problem is and I am able to replicate in my environment as well using your code from your original screenshot. I don't know if it is a bug or not, but you could get around it by chaining the event to trigger the queries directly in the screenshot below. Maybe someone from the Retool team would be able to replicate and see if there is a bug. You should still keep the "Change" event within the dateRange1 component.
Hi @programmer Thank you! I see what you mean now. I am submitting this bug to our team.
For a workaround in the meantime, can you try returning the start and end dates in a transformer & then reference the transformer values in your text component?
Hello!
I don't want to bug anyone, but the problem is still present. @retool-team@moderators whats the status? Are you working on this?
Our board heavily depends on fixing this bug, so any update would be appreciated.
Thanks
Hi @benbeu, I don't have any updates on this issue I've passed along your need for this bug to be fixed and I'll be sure to post any news on the issue here!