Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tracked by #588
andrzejewsky opened this issue Sep 21, 2023 · 1 comment
Open
Tracked by #588

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

andrzejewsky opened this issue Sep 21, 2023 · 1 comment

Comments

@andrzejewsky
Copy link
Member

andrzejewsky commented Sep 21, 2023

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>
@github-project-automation github-project-automation bot moved this to 🆕 New in MacawUI Sep 21, 2023
@krzysztofzuraw krzysztofzuraw changed the title [Feature]: Align combobox-related API [Feature]: Refactor Option API for select-like components Sep 22, 2023
Copy link

stale bot commented Nov 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 21, 2023
@stale stale bot closed this as completed Nov 28, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in MacawUI Nov 28, 2023
@andrzejewsky andrzejewsky reopened this Nov 29, 2023
@stale stale bot removed the stale label Nov 29, 2023
@andrzejewsky andrzejewsky added this to the 1.0.0 milestone Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant