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

numberOfLines not working for MultiSelect #188

Open
eduardo-santos-tribia opened this issue May 31, 2023 · 2 comments · May be fixed by #282
Open

numberOfLines not working for MultiSelect #188

eduardo-santos-tribia opened this issue May 31, 2023 · 2 comments · May be fixed by #282

Comments

@eduardo-santos-tribia
Copy link

Hi, the current MultiSelect component doesn't allow much customization with the selected content in terms of listing them separated by commas for example, and keep the MultiSelect Dropdown with the same height size, and number of lines. The UI I want to achieve is something like this:

image

I tried with the renderSelectedItem but it didn't work as expected, so I decided to use the placeholder prop to achieve this UI, it worked but when the placeholder content is bigger than the Dropdown it breaks to a second line and I don't want it.

So, I was checking the lib code, and the selectedTextProps is not used for MultiSelect and I decided to add it as a patch to the library. If anyone else has this issue I'm posting the patch solution below:

The file should be placed inside the patch folder in the root of your project:
react-native-element-dropdown+2.9.0.patch

PS: I didn't have much time to create a PR for this, so feel free to create a PR with this solution.

@JonasChan31Degrees
Copy link

HI Eduardo, good catch on this issue. I am trying what you did using your patch. The new props that has been patched however is not being shown when using the component. Can you please advise on this?

@eduardo-santos eduardo-santos linked a pull request Jun 10, 2024 that will close this issue
@eduardo-santos
Copy link

Hi @JonasChan31Degrees , I've created this PR to solve this. We just have to wait for someone to merge and release a new version.

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

Successfully merging a pull request may close this issue.

3 participants