Skip to main content

cascader_trigger_handler

Function cascader_trigger_handler 

Source
pub fn cascader_trigger_handler<E: 'static>(
    open: Signal<bool>,
    browsed: Signal<Vec<String>>,
    value: Signal<Vec<String>>,
) -> Option<Rc<dyn Fn(E)>>
Expand description

Builds the click handler of the trigger.

The handler opens and closes the panel. Opening it puts the panel back on the chosen path, so the reader always starts where the last choice left off.

The event type is a parameter so the DOM-free test suite can drive the handler with a stand-in event; the component always instantiates it with Event.

§Arguments

  • Signal<bool> - The panel’s open state.
  • Signal<Vec<String>> - The browsed path owned by the component.

§Returns

  • Option<Rc<dyn Fn(E)>> - The trigger click handler.