Hey guys, so I have a dash-app that takes a bunch of inputs (at least 18), does some computation and appends the output to a CSV file. I’m using the submit button as a way of appending values to the csv file.
The problem is that every time I click on the submit button, my the page refreshes and as a result my Input fields are reset back to the default values. Is there a way to disable the page refresh or at the very least conserve the values on the Input fields?
Here is the code snippet responsible for appending the csv.
[State(“output_1”, “data”), State(“output_2”, “data”)],
def append_to_csv(n_clicks, output_1, output_2):
if n_clicks is None:
if (output_1 is None) or (output_2 is None):
with open(“result.csv”, “a+”) as f: