Skip to content

Composition API: A new options is not shown as selected when it is added and selected at the same time #446

Description

@odzhychko

Version

  • Vue version: 3

Description

The bug is specific to usage with the Composition API.
Given options and value passed as a Ref.

When a new option is added to options and also to value to make it selected,
the newly added option is not displayed as selected.

It seems, that the internal state for selected options to be displayed relies on the internal state of available options. But with composable, the internal state of available options is updated before the internal state of selected options.

Demo

Screencast.From.2025-04-17.00-34-18.mp4

https://jsfiddle.net/Lnso82b5/7/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions