Function zng_wgt::on_pre_update
source · pub fn on_pre_update(
child: impl UiNode,
handler: impl WidgetHandler<OnNodeOpArgs>,
) -> impl UiNode
Expand description
P
Preview on_update
event.
This property calls handler
every time the UI updates, before the widget content updates. This means
that the handler
is raised before any on_init
handler.
§Handlers
You can use one of the handler macros, hn!
or hn_once!
, to declare a handler closure. You must avoid using the async
handlers as they cause an update every time the UI task advances from an await point causing another task to spawn.