Best way to "ignore" a widget if it's in its default state? (Feature request?)

I can’t tell if this is a feature request or just a normal question, but I’ll just ask:

I have a bunch of UI filter widget, and I’d like to have the capability to basically ignore them if they’re in their default state. I can do this by checking manually, but that requires me to repetitively copy the detail value for each widget. I was curious if there is something in Streamlit that “knows” all of the default values of a scripts UI widgets? And if not, is that a possible feature? I could imagine some kind of structure indexed by key…

Perhaps I’m making this much more complicated than it needs to be… :sunglasses:

I think you might be overthinking this. Because widgets return Python variables, there’s no way for Streamlit to know if you’re going to use that value downstream as an input somewhere else. So the widget on first load assigns the default value to the Python variable, then moves on.

If I’m understanding you correctly, the value wouldn’t get set, so you’d essentially be passing an Optional downstream (value or None). That seems like a worse situation in a language like Python.