Skip to content

Option is not set from initial value on selects #153

@JamesLMilner

Description

@JamesLMilner

Bug

When using Dojo 4.0.0 to create a custom <Select> widget, the option does not get set correctly from the initial value.

@agubler believes this may be because in the VDOM nodes are created from the parents downwards, which means the option do not exist when the parent select is created.

Package Version: 4.0.0

Code

const r = renderer(() => v('select', { value: 'b' }, [
    v('option'),
    v('option', { value: 'a' }, ['a']),
    v('option', { value: 'b' }, ['b'])
]));
r.mount();

Codesandbox:

Edit dojo-codesandbox-template

Expected behavior:

The option is correctly set when the is initialized with a given value.

Actual behavior:

The option is not set.

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