Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select stable #1950

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Select stable #1950

wants to merge 2 commits into from

Conversation

qknight
Copy link

@qknight qknight commented Oct 25, 2023

This is the select_stable example I wrote which is referenced #1937.

grafik

I fixed to snake_case but the issue with adding an item while the first item is selected still persists.

I compiled this on NixOS linux with rustc 1.73.0 (cc66ad468 2023-10-03)

The javascript console on windows prints:

panicked at /mnt/c/Users/joschie/Desktop/Projects/leptos/leptos_reactive/src/signal.rs:1595:21:
already mutably borrowed: BorrowError

Stack:

__wbg_get_imports/imports.wbg.__wbg_new_abda76e883ba8a5f@http://localhost:8080/select_stable-83ba49344c9a9434.js:275:17
console_error_panic_hook::Error::new::hcdbd44f71c4eef70@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[3693]:0x155189
console_error_panic_hook::hook_impl::h9a27a81a72d3ab0a@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[702]:0xdcae9
console_error_panic_hook::hook::h071a3539a231d7c6@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[3944]:0x158a0a
core::ops::function::Fn::call::ha0265fe8294d21dd@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[3543]:0x152c3f
std::panicking::rust_panic_with_hook::h3aa054d35a0817d7@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1534]:0x118baf
std::panicking::begin_panic_handler::{{closure}}::h2f73e4cf6cd6319a@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1962]:0x12c439
std::sys_common::backtrace::__rust_end_short_backtrace::h98ac61a6abbff7e9@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[4832]:0x161255
rust_begin_unwind@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[2901]:0x146b05
core::panicking::panic_fmt::h3e1dd3d08288569e@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[3935]:0x158839
core::result::unwrap_failed::h8b3db0f11171b57b@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[2472]:0x13c709
core::cell::RefCell<T>::borrow::h063d31768f9242b3@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1334]:0x10da0f
<leptos_reactive::signal::RwSignal<T> as leptos_reactive::signal::SignalGet>::get::{{closure}}::h0c18694cc90b20b0@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[313]:0xa6246
leptos_reactive::runtime::with_runtime::{{closure}}::ha3e804e041f1e9df@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[2964]:0x148054
std::thread::local::LocalKey<T>::try_with::h55a00239f93c5647@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[710]:0xdd7bf
std::thread::local::LocalKey<T>::with::h929fc35c8742d85d@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1106]:0xfee8b
<leptos_reactive::signal::RwSignal<T> as leptos_reactive::signal::SignalGet>::get::h1b8522df7d3c5575@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[83]:0x29d90
select_stable::Dynamic_selector::__Dynamic_selector::{{closure}}::h37f712de3c9992db@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[370]:0xb197e
<leptos_dom::components::dyn_child::DynChild<CF,N> as leptos_dom::IntoView>::into_view::{{closure}}::he7f3bb0503be3291@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[138]:0x643c0
<alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hb9983e9e6e55b1dc@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[3249]:0x14d9f7
<leptos_dom::components::dyn_child::DynChild<CF,N> as leptos_dom::IntoView>::into_view::create_dyn_view::{{closure}}::hf9af3a26b33ce6d1@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[73]:0x13208
<leptos_reactive::effect::EffectState<T,F> as leptos_reactive::effect::AnyComputation>::run::h5d59989cc9e97874@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[97]:0x3d513
leptos_reactive::runtime::Runtime::update::{{closure}}::h8ea5a995a9918473@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1379]:0x1103fd
leptos_reactive::runtime::Runtime::with_observer::h92503f9685301ed9@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[920]:0xf0a2f
leptos_reactive::runtime::Runtime::update::h287e125ad8fc6fcc@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[180]:0x7eeae
leptos_reactive::runtime::Runtime::update_if_necessary::h4e7e860ed1a94e93@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[271]:0x9cb00
leptos_reactive::runtime::Runtime::run_effects::ha7ffa8ea78723211@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[649]:0xd74f8
leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::update::{{closure}}::h1fbdea59f9e0d06b@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[172]:0x7b8f4
leptos_reactive::runtime::with_runtime::{{closure}}::h13dc29d0836f082b@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1905]:0x129f72
std::thread::local::LocalKey<T>::try_with::hde523048e3cd0852@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[686]:0xdb2c6
std::thread::local::LocalKey<T>::with::h12383194f145d02b@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1218]:0x10673d
<leptos_reactive::signal::RwSignal<T> as leptos_reactive::signal::SignalSet>::set::hd085c305837ea6a4@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[84]:0x2be7f
select_stable::Dynamic_selector::__Dynamic_selector::{{closure}}::{{closure}}::hdb12f971aeaab445@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[335]:0xaae07
leptos_reactive::signal::<impl leptos_reactive::node::NodeId>::update::{{closure}}::hc0b4cd9a1d4ab924@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[173]:0x7bbe7
leptos_reactive::runtime::with_runtime::{{closure}}::h94f006737a49fc21@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1906]:0x12a010
std::thread::local::LocalKey<T>::try_with::h78e0c2f5f8e3e2f3@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[687]:0xdb462
std::thread::local::LocalKey<T>::with::h94117890acf49b29@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1219]:0x106841
select_stable::Dynamic_selector::__Dynamic_selector::{{closure}}::h02c32cf80e2626e2@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[75]:0x19851
<alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut::h5174bd8e9595fd2c@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[2840]:0x14558d
leptos_dom::events::add_event_listener::{{closure}}::he6dae7f73dd234d5@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1075]:0xfcc31
<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::hb6241c2901a82808@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1590]:0x11ba3d
__wbg_adapter_18@http://localhost:8080/select_stable-83ba49344c9a9434.js:208:10
real@http://localhost:8080/select_stable-83ba49344c9a9434.js:193:20
__wbg_get_imports/imports.wbg.__wbg_call_01734de55d61e11d/<@http://localhost:8080/select_stable-83ba49344c9a9434.js:510:33
handleError@http://localhost:8080/select_stable-83ba49344c9a9434.js:229:18
__wbg_get_imports/imports.wbg.__wbg_call_01734de55d61e11d@http://localhost:8080/select_stable-83ba49344c9a9434.js:509:63
js_sys::Function::call1::h7f82a1f4cafd97af@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1006]:0xf7855
leptos_dom::events::add_delegated_event_listener::{{closure}}::{{closure}}::h140405257a8fd2e2@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[162]:0x767ec
leptos_dom::events::add_delegated_event_listener::{{closure}}::{{closure}}::h1163d97d646444ea@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1236]:0x107a5d
<dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h5bb55416984d417a@http://localhost:8080/select_stable-83ba49344c9a9434_bg.wasm:wasm-function[1591]:0x11bb1a
__wbg_adapter_21@http://localhost:8080/select_stable-83ba49344c9a9434.js:212:10
real@http://localhost:8080/select_stable-83ba49344c9a9434.js:193:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant