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

CMultiSelect with multiple={false} inserts selected value as placeholder #427

Open
niksajanjic opened this issue Jan 8, 2025 · 0 comments

Comments

@niksajanjic
Copy link

This is PRO feature, but I don't have access to PRO repo therefore I created the issue here:

If we're using CMultiSelect with multiple={false} which means we only want to select one option, the selected option would be selected as a placeholder which seems to be wrong. Here's a screenshot how it looks like when multiple options are selected:
Screenshot 2025-01-08 at 16 37 37

As you can see, selected values have a nice black color.

But when you select only one option, than the placeholder is changed with selected value which doesn't make any sense to me:
Screenshot 2025-01-08 at 16 36 27
Screenshot 2025-01-08 at 16 37 00
Screenshot 2025-01-08 at 16 37 07
Screenshot 2025-01-08 at 16 37 19

In multiple selections example we have selectionType="text", and in single selection example it doesn't matter if we choose text, tags or avoid it altogether.

I see that in multiple selection we have multiple <span/> elements inside form-multi-select-selection that represent selected values and the the input at the end. And I understand in single selection we don't want one span and input after it. But the current solution with placeholder also makes no sense and it results in placeholder and selected value to be the same color. I think we should control the input through React and select input's value, not it's placeholder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant