Skip to content

Conversation

@jesper-olsen
Copy link
Contributor

Description

Fixes a bug where double-clicking to edit a task in the filtered view would edit the wrong task.

The Problem:

  • When filtering tasks (Active/Completed/All), the UI displays a filtered subset
  • Double-clicking a task passes its index in the unfiltered list to ToggleEdit
  • The ToggleEdit handler incorrectly filtered the list before looking up the index
  • This caused an "off-by-n" error where the wrong task would be edited

Steps to reproduce:

  1. Create 3 tasks
  2. Mark the first task as completed
  3. Filter to show only "Active" tasks (2 tasks remain)
  4. Double-click the first visible task to edit it
  5. Bug: The edit field shows the description of task Virtual dom #2 instead of task Add components #1

The Fix:
Remove the .filter() call in the ToggleEdit handler since we're already using the correct unfiltered index.

Fixes #0000

Checklist

  • [ x] I have reviewed my own code
  • [ x] I have tested the app in a browser
  • I have added tests

…list of tasks - not the filtered list displayed to the user.
@github-actions
Copy link

github-actions bot commented Jan 23, 2026

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 98.289 98.289 0 0.000%
boids 167.858 167.858 0 0.000%
communication_child_to_parent 91.554 91.554 0 0.000%
communication_grandchild_with_grandparent 102.632 102.632 0 0.000%
communication_grandparent_to_grandchild 99.029 99.029 0 0.000%
communication_parent_to_child 88.913 88.913 0 0.000%
contexts 104.202 104.202 0 0.000%
counter 85.585 85.585 0 0.000%
counter_functional 85.949 85.949 0 0.000%
dyn_create_destroy_apps 88.676 88.676 0 0.000%
file_upload 98.185 98.185 0 0.000%
function_delayed_input 91.559 91.559 0 0.000%
function_memory_game 169.999 169.999 0 0.000%
function_router 329.240 329.240 0 0.000%
function_todomvc 161.578 161.578 0 0.000%
futures 234.470 234.470 0 0.000%
game_of_life 103.884 103.884 0 0.000%
immutable 246.042 246.042 0 0.000%
inner_html 80.077 80.077 0 0.000%
js_callback 107.987 107.987 0 0.000%
keyed_list 179.292 179.292 0 0.000%
mount_point 83.286 83.286 0 0.000%
nested_list 112.817 112.817 0 0.000%
node_refs 90.930 90.930 0 0.000%
password_strength 1738.864 1738.864 0 0.000%
portals 92.417 92.417 0 0.000%
router 302.355 302.355 0 0.000%
suspense 112.000 112.000 0 0.000%
timer 88.136 88.136 0 0.000%
timer_functional 96.218 96.218 0 0.000%
todomvc 141.559 141.371 -0.188 -0.132%
two_apps 85.448 85.448 0 0.000%
web_worker_fib 133.954 133.954 0 0.000%
web_worker_prime 185.345 185.345 0 0.000%
webgl 82.714 82.714 0 0.000%

✅ None of the examples has changed their size significantly.

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.

1 participant