euv-example 0.3.13

An example application demonstrating the euv UI framework with reactive signals, custom components, and WebAssembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::*;

/// Creates a click event handler that sets the active tab signal for the keep-alive demo.
///
/// # Arguments
///
/// - `Signal<String>` - The tab signal to update.
/// - `&str` - The tab value to set.
///
/// # Returns
///
/// - `NativeEventHandler` - A click handler that sets the active tab.
pub fn keep_alive_tab_on_select(tab: Signal<String>, value: &str) -> NativeEventHandler {
    let value_owned: String = value.to_string();
    NativeEventHandler::new(NativeEventName::Click, move |_event: NativeEvent| {
        tab.set(value_owned.clone());
    })
}