Hi, I have an application in React Js and when I apply some filters and do a query it works fine, but when I do a second query, the filters that I applied are not in this new query.
Hi @emoya, Let me see if I understood correctly. I see in this method you are executing an already created query (otherwise you would not use cf.getVisualization()). This query dummy is affected at some point with filters. Then you execute the query again and the data being returned has doesn’t include the filters?
Can you try the following: When the filters are applied, please open the developer tools and run cf.getVisualization('dummy').get('config').filters and check if this is empty. In case it is, the query most have been overwritten at some point. Otherwise it should show the filters.
To go beyond, try running the entire code from the console:
Should not be the case, as long as you create the visualization only once (the first time) , you can obtain the instance with the getVisualization() and call the .execute() as many as you want. It will always be the same instance and it will always return the promise that will give you the data after resolved.
On the issue related with the slowliness, I suggest to run a performance test because I don’t think is a CF issue. Maybe the component is being re-rendered too many times and unnecessarily executing the same query over and over. A performance benchmark will tell you what script and function is taking too long.