Function zng::widget::node::presenter_opt
source ยท pub fn presenter_opt<D>(
data: impl IntoVar<Option<D>>,
wgt_fn: impl IntoVar<WidgetFn<D>>,
) -> impl UiNodewhere
D: VarValue,
Expand description
Node that presents data
using wgt_fn
if data is available, otherwise presents nil.
This behaves like presenter
, but wgt_fn
is not called if data
is None
.