Skip to content

cannot make Select display selected the option corresponding to value #57

@blset

Description

@blset

Hello,

in the code below admin_status comes as Option and AdminType impl Display and is a simple enum

I'm sure the value is one of the options because it is printed on the console
but the select box does not set itself on the corresponding option, even though everything is turned into String

                    <Select
                        value=admin_status.map(|f| f.to_string()).unwrap_or(String::new())
                        placeholder="Status"
                        name="admin_status"
                    >
                        <SelectContent label="Statuts">
                            {AdminStatus::ALL
                                .map(|k| {
                                    view! {
                                        <SelectItem value=k.to_string()>{k.to_string()}</SelectItem>
                                    }
                                })
                                .collect_view()}
                        </SelectContent>
                    </Select>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions