`Plotly.react()` plotting two superimposed graphs

I have a table where I can select different lines, and according to what is selected, some footer graphs are updated with the data relative to that specific line (using Plotly.react()). There is a problem happening when I click on a line and immediately click on another line (before the plot of the first is finished): the plot will then have data from both lines overlapping, which should not be the case (see image below).

Is there a way to avoid that, maybe sending some abort signal before plotting? I tried sending different uirevisions for each plot, but it doesn’t solve the problem.

It seems that what I needed was layout.datarevision instead.