Function zng::app::on_new

source ·
pub fn on_new(
    child: impl UiNode,
    handler: impl WidgetHandler<CommandArgs>,
) -> impl UiNode
Expand description

P On new command.

Receives NEW_CMD command events scoped on the widget. The command parameter can be the new item type identifier.

§Preview

You can preview this command event using on_pre_new. Otherwise the handler is only called after the widget content has a chance to stop propagation.

§Async

You can use async event handlers with this property.