Skip to content

[ToggleGroup] Better type safety #3142

@michaelhazan

Description

@michaelhazan

Feature request

Summary

Currently ToggleGroup's props are filled with any instead of just being generic.
on top of that, the value prop and onValueChange don't depend on if the multiple is true or not causing the component to always expect and array (even if multiple select is not expected).

What i suggest is the behavior to be the same as the way that Combobox component handles the value and multiple props.

Motivation

Feels more consistent with the rest of the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: toggle groupChanges related to the toggle group component.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.typescript

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions