Skip to content

[Feature]: Refactor Option API for select-like components #591

@andrzejewsky

Description

@andrzejewsky

What I'm trying to achieve

Currently, the API for the Option prop is expanding in our select-like components. For example, we added support for endAdornment and startAdornment, which is not an elegant solution and can result in an explosion of props.

Proposed solution

To address this, we can enhance the way options are passed to select-like components in two ways:
1. Simple usage: You can pass options as { label: string, value: string }.
2. Advanced usage: You can utilize the composition API as follows:

<Select>
	<Select.Option>Custom option</Select.Option>
</Select>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions