I’m loving the new trigger condition for text input widgets of “input is exited” instead of just when the enter key is pressed. I realized I would also find it helpful to have a trigger condition of “when clear button is pressed.” Or alternatively, a unified trigger condition for “whenever the input changes” (though I realize that may be untenable as it would be triggering constantly as a user is typing).
My use case involves updating the preview of a label whenever a user changes the text input. I had been doing this with a separate ‘refresh’ button, but the addition of “input is exited” allowed me to trigger the refresh logic more naturally for the user. The only exception now is when the clear button is pressed.
Hi @pgabrys thanks for the feedback! Glad to hear you are taking advantage of the new trigger condition!
Can you confirm that I have your use case correct? You are hoping to have the text input value sync and match with the preview value. The “input is exited” trigger helps get you there most of the way, but there’s an exception right now with the clear button.
I am not seeing this in LTS 14.4 - when we clear the input for a variable used as an EQUALS filter for an interactive table widget, the table does not go back to what it showed when the variable was null. We added a trigger on input exit, but this trigger does not seem to fire when the clear input feature is used.
@jmlowden my current workaround for this currently is just to put a button in place of where the default clear input item on the widget is that looks the same.
Then I can add whatever triggers I need for that instance where a user clears the data
As a side note I’ve noticed some odd behavior how tulip treats the value in the text variable when the clear function is used.
If a user enters something then clears the value the state of that variable is no longer null but empty which is different.
So if have a condition or trigger to test if that input is null a user can work around your triggers purposefully or by accident by inputting something there then clearing it and pressing another button that tests for null on that text input.
So that’s where I come back to just using a button the clear / null the values with triggers and whatever other actions I need.
That’s because the clear button does not clear the variable, it leaves an empty string as if you use backspace. I actually hate that fact, but that’s how it is …