When I select an event handler on eg. a button, to control the query builder there is no available methods for the query builder. How do i clear the input on the query builder from another component or after a successful query?
Hello! Thanks for writing in.
So, the query builder is a largely unsupported component. As in, the built-in methods that you see in other components aren't available. Thankfully, we do have a workaround!
- Use Retool's temporary state (docs here) to create a new temporary state. You can set it to have a default value.
- Set your target component's value to be that state (referenced in double curlies)
- Write a JS query or use the event handler you mentioned to update state —
- Run this JS query/event handler to update the state, and therefore, update your target component!
Please, let me know if you have any questions!