Drag and drop list not reactive
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 40/100
Research direction
Start with the DragAndDropList component and how it takes its items prop, then reproduce the report with the use_signal snippet from the issue. Check whether the list re-renders when the signal's vector changes, since the reporter says pushed items never appear. Done means either the list updates reactively when the signal changes, or the maintainers confirm the static-items behaviour is intended and document it.
Written by the indexing model from the issue text.
Description
When updating my signal vector with items for my drag and drop list, the component is never re-rendered.
A little test I ran didn't work
let signal_data = use_signal(||vec!["Hello", "World"]);
let items = signal_data.iter().map(|value|{
rsx! {
span { key: "{value}", "{value}" }
}
}).collect();
rsx! {
DragAndDropList { items }
}
And then a button that calls
signal_data().push("New data")
The items "Hello" and "World" do show up, but my "New data" doesn't.
Is this intended behavior or a bug?
Because I would like a dynamic drag and drop list where I can add items for something like a TODO list. But since the items are static I can't do that.
- Dominant language
- Rust
- Stars
- 358
- Forks
- 90
- Avg merge
- 54m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DioxusLabs/dioxus-components
-
Roving-focus re-focus dismisses a just-opened modal Dialog (focusin light-dismiss)Possibly taken @5at15h claimed this 44 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DioxusLabs/dioxus-components#303 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DioxusLabs/dioxus-components#294 ·
-
Range SliderOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DioxusLabs/dioxus-components#292 · 2 comments ·
-
Component library depends on `dioxus` crate with default features enabledPossibly taken @ealmloff claimed this 185 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DioxusLabs/dioxus-components#272 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DioxusLabs/dioxus-components#321 ·
All issues in DioxusLabs/dioxus-components
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mongodb/kingfisher#588 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug rust
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
franciscoBSalgueiro/en-croissant#1111 ·
Maintainers usually reply within 2 days
-
[bug] Toolchain versions from `.prototools` are not inherited when moon runs from a subdirectoryOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day