Skip to content

fix(dialog-select): preserve selection when options reorder#280

Open
ariane-emory wants to merge 2 commits into
devfrom
fix/model-selection-follows-favorite
Open

fix(dialog-select): preserve selection when options reorder#280
ariane-emory wants to merge 2 commits into
devfrom
fix/model-selection-follows-favorite

Conversation

@ariane-emory
Copy link
Copy Markdown
Owner

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When options are reordered (e.g., favourite/unfavourite in model list), the highlighted selection was staying at the same row index and pointing to a different item. Now we use on(() => flat(), ...) with the previous flat array to find the previously selected value in the new options list and restore the selection to the correct index.

This means that when the ctrl+f key is used to favourite or unfavourite their model in the model_list, the selection will remain on the same model instead of remaining on the same index (which will now contain a different model).

ariane-emory and others added 2 commits May 17, 2026 14:39
When options are reordered (e.g., favorite/unfavorite in model list),
the highlighted selection was staying at the same row index and
pointing to a different item. Now we use on(() => flat(), ...) with
the previous flat array to find the previously selected value in the
new options list and restore the selection to the correct index.
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