Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

search input in multiple - doesn't render selected results after dropdown close #207

Open
darekzak opened this issue Sep 15, 2017 · 4 comments

Comments

@darekzak
Copy link
Contributor

darekzak commented Sep 15, 2017

Is it possible to have search input in dropdown for multiple inputType? Because from what I see when showSearchInputInDropdown is set to true search input shows, but after selecting any item, dropdown closes, but there are no items displayed as selected. When I reopen dropdown, i can see that previously selected item is missing in dropdown list, so i guess that there is some problem with displaying it in container for selected items. Or maybe for some reason search isn't allowed in multiple, but if so then what's the reason for it?

@darekzak darekzak changed the title search input in multiple -tra search input in multiple - doesn't render selected results after dropdown close Sep 15, 2017
@darekzak
Copy link
Contributor Author

Ok, I think i can manage to position search input for multiple in dropdown by styles/custom templates. But still i think that this situation with showSearchInputInDropdown: true in multiple is a bug.

@arendjr
Copy link
Owner

arendjr commented Sep 16, 2017

Search inputs in dropdowns are not supported for multiple input types because the searching is supposed to be done in the input in the selector itself. To be honest I'm a bit confused of what you're trying to achieve... do you have a screenshot of what you intend to do?

@darekzak
Copy link
Contributor Author

I'll try to describe the whole process that got me to the bug/strange behaviour

Goal: search input to be displayed in dropdown

  1. showSearchInputInDropdown: true as an option to multiple contructor
  2. dropdown opens - search input is displayed in dropdown, the same as in single select
  3. select any item from dropdown
  4. dropdown closes
  5. If before opening dropdown there were some items displayed as selected then those items now are gone. There is empty select.

Then I read in documentation that this option showSearchInputInDropdown: true is meant to be used only in single input type. So if it has no meaning for multiple input, then i guess that passing it as one of the options shouldn't lead to the situation that i described. I would rather expect not showing search input in dropdown, or throwing some error/warning in console if in options there is something that has no impact on plugin.

If you'll consider it as bug, I would be happy to try to fix it.

@arendjr
Copy link
Owner

arendjr commented Sep 19, 2017

I agree not showing it, possibly with a warning (in dev builds only) would be more desirable here. PR welcome :)

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