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

AutoComplete forceSelection with Multiple overwrites selection #1205

Closed
mallorygiles opened this issue Apr 22, 2021 · 0 comments
Closed

AutoComplete forceSelection with Multiple overwrites selection #1205

mallorygiles opened this issue Apr 22, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mallorygiles
Copy link

I'm submitting a ... (check one with "x")

[ x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

Current behavior
The following happens if you have forceSelection on an AutoComplete that has :multiple="true".
Issue 1
Actions: Select 1 item and then start typing to select another item, but do not select from dropdown.
Result: The initially selected item is cleared.
Issue 2
Actions: Select 1 item and then select another
Result: The first item is cleared out/replaced by the second one that was selected

Expected behavior
Issue 1
Expected: The item that is already selected remains, but the characters that were typed are cleared
Issue 2
Expected: Both of the selected items are in the input field

Minimal reproduction of the problem with instructions
This bug can be reproduced by adding the forceSelection property to the Multiple AutoComplete of the PrimeVue Demo
<AutoComplete :multiple="true" v-model="selectedCountries" :suggestions="filteredCountries" @complete="searchCountry($event)" field="name" forceSelection/>

What is the motivation / use case for changing the behavior?
We would like to be able to force the user to make a selection from the items returned by the AutoComplete while at the same time being able to use the Multiple functionality

Please tell us about your environment:
OS: Windows 10, Windows Server 2012
IDE: VS Code
HTTP Server: Vue-CLI dev server

  • Vue version: 3.0.11

  • PrimeVue version: 3.4.0

  • Browser: Chrome 89

@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Apr 30, 2021
@tugcekucukoglu tugcekucukoglu added this to the 3.4.1 milestone Apr 30, 2021
@tugcekucukoglu tugcekucukoglu self-assigned this Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants