Data request triggered twice when time range changes in the available content constraints
So we land on this page with the Last 2 Periods as Time Selection, based on the available content constraints for the data selection, we get a time range going from 2007 to 2019, and so we make a data request
with startPeriod=2018
as the time selection in order to get data for 2018 and 2019.
Then, when selecting Citizens having confidence in national government
in the Measure
filters, what happens is that both data and available content constraints requests are triggered twice, which can lead to a first table being rendered and quickly replaced by a spinner and a new table
The cause of this is that, by changing the selection in the filters, the two new requests are made with the same time selection and the updated dataquery. However when the new available content constraints are received, the time range as changed from [2007, 2019] to [2007, 2018], and thus since we are still in a last 2 period selection, new requests are made with an updated time selection startPeriod=2017
(which in this example changes nothing since there is no data between 2007 and 2018, which generates the exact same table with only data for 2018).