Manually triggering "change" event on select component

Hi! I'm setting the value (using setValue) of a select component from a Query run on page load (it gets the default select value from url.searchParams and sets it)

The problem is that the select change event doesn't run automatically, is any way I can trigger the change event manually?

1 Like

Hi @Martin_Sarsale_terres,

So just to clarify, do you have a Javascript query that runs on page load and it has a setValue() method for your select component, but it is not working?

Would you be able to share screenshots about yoru set up and a copy of your code?

Also, wouldn't you be able to set the value in select's component default value, something like {{ url.searchParams?.client_Id || null }} which will check if the parameter is define,d otherwise it will set the value empty.

Hope this helps!

Thanks! The setValue is working (sets the value) but it doesn't trigger the change event.
The same with component default value: it gets set but change event is not triggered.

In this event handlers, I configure other components; this is the part I'm missing.

1 Like

Hello @Martin_Sarsale_terres,

In order to better understand the issue you are facing, could you please provide additional details such as screenshots or a short screen recording? This will allow us to clearly visualize the problem.

Additionally, if possible, sharing the demo app JSON would enable us to replicate the issue on our end and offer a more precise solution.

We appreciate your cooperation, as the more context we have, the more efficiently we can assist you.

Hey @Martin_Sarsale_terres,

Ah I see what you mean.

That's correct, whenever the value of the select component is set by either the default value changing, or a method being used in a query, the event within your component won't trigger.

Can you share more about what is it that this event handler is triggering? I'm thinking you could have a JS query that runs also on page load, and your event handler is triggering that js query as well. As such, you would have a js query that is triggered both on page load and when the value is changed by user.