hope you are all doing well. I try to develop custom component where we read columns from excel files.
Component has two inputs (file path, columns to read) and as a output list of data from excel. Everything works fine but I would like to add a third input which will react to the button (true/false) and componment recompute only when the button is clicked.
My problem is that button click change input twice false => true and back true => false. Therefore, my component recalculates itself twice and second recalculation end with empty output as input is false.
I am not able to overcome this. Is there any hack to overcome this?
Why do you say hi only to smart guys, I would also want to participate into discussion
My favourite hack to overcome this is actually not a hack, but simply forget about button, but use Boolean Toggle. I know that Button looks fancy, but the fact that switches back into false is also problematic for many different cases. E.g. if your component will throw some exception only when True is being set, then also you won’t notice it, because it will automatically set it back to false. So I recommend using Boolean Toggle and move forward