Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Select: can't render react component as a value #103

Open
mishk0 opened this issue Aug 30, 2016 · 4 comments
Open

Select: can't render react component as a value #103

mishk0 opened this issue Aug 30, 2016 · 4 comments

Comments

@mishk0
Copy link

mishk0 commented Aug 30, 2016

<Select>
        <Item value={ id }>
             <Icon id="en"/>
              en
        </Item>
</Select>

In an example above I won't see an icon, because there is a restriction connected with displaying only text. Why do we need that?

@narqo
Copy link
Owner

narqo commented Aug 30, 2016

Why do we need that?

If you have a Menu type="check", you have to concatenate values (or content) from all checked items. This is how the control works in bem-components and this is how it was designed.

@narqo
Copy link
Owner

narqo commented Aug 30, 2016

Actually, renderButtonText() is a hook-method, that was added after the discussion about various real use cases. See this comment #52 (comment)

@mishk0
Copy link
Author

mishk0 commented Aug 31, 2016

But, the default behavior that I expect from the select is "what I see in <Item>, I will see in <Button>". The same for multiple select, the concatenation will look like [<item1>, ', ', <item2> ].

@narqo
Copy link
Owner

narqo commented Aug 31, 2016

the default behavior that I expect from the select is "what I see in , I will see in "

When the control was implemented in bem-components, our internal design guides "thought different". And, as react-islands is just a port of the initial library, we have the same behaviour, that we had.

We might fix this in future. But PRs are welcome, anyway.

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

No branches or pull requests

2 participants