You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a web page which connects to a USB or BLE device using an action:
let connect = create_action(|connection_type:&ConnectionType| {let connection_type = connection_type.to_owned();asyncmove{let result = match connection_type {ConnectionType::Usb => UsbConnectionBuilder::connect().await,ConnectionType::Ble => BleConnectionBuilder::connect().await,}.map(|b| Rc::new(b));ifletErr(e) = result.as_ref(){console_log!("Error connecting with {:#?}: {:#?}", connection_type, e);}
result
}});let connection = connect.value();
I want a way of clearing the value of an action when a "Disconnect" button is clicked.
Describe the solution you'd like
A Action::clear_value function or something similar
Describe alternatives you've considered
Create a signal that is a number. If the number is greater than the action version, it means that the action's result should be ignored. When the "Disconnect" button is pressed, increase the number.
Is your feature request related to a problem? Please describe.
I have a web page which connects to a USB or BLE device using an action:
I want a way of clearing the value of an action when a "Disconnect" button is clicked.
Describe the solution you'd like
A
Action::clear_value
function or something similarDescribe alternatives you've considered
Create a signal that is a number. If the number is greater than the action version, it means that the action's result should be ignored. When the "Disconnect" button is pressed, increase the number.
Additional context
My project that uses Leptos: https://github.com/ChocolateLoverRaj/rust-esp32c3-examples/tree/sensor-connect-web/sensor-connect
The text was updated successfully, but these errors were encountered: