Skip to content

Generically typed selection UI #6695

@OliverMadine

Description

@OliverMadine

Feature request

Would be nice to have a selection UI that works with enums. SegmentedControl is nice but the callback is always string

Examples

const options: {label: string, value: MyEnum} = {...};

const handleValueChange = (newValue: MyEnum) => {...};

... 

<SegmentedControl<MyEnum> options={options} onValueChange={handleValueChange}>
...
</SegmentedControl>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions