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

Taginput: allows new entry when autocomplete is false #394

Closed
urkle opened this issue Aug 3, 2022 · 4 comments · Fixed by #956
Closed

Taginput: allows new entry when autocomplete is false #394

urkle opened this issue Aug 3, 2022 · 4 comments · Fixed by #956
Labels
question Further information is requested

Comments

@urkle
Copy link
Contributor

urkle commented Aug 3, 2022

Overview of the problem

Oruga version: next - 0.5.5
Vuejs version: 3.2.37
OS/Browser: macOS/Firefox

Description

A tag input without autocomplete enabled allows adding new entries (Even though allowNew is false).

Steps to reproduce

  1. Create a inputitems component
  2. Type text into the component and press "enter"

Expected behavior

No new entry to be added to the input items

Actual behavior

A new item is added.

Additional information

It seems there are two issues here

  1. the "keypress" code only checks !allowNew when autocomplete is enabled
  2. when autocomplete is false the input control is still accepting input and keypresses. Ideally this should not happen if autocomplete is off.
@jtommy
Copy link
Member

jtommy commented Aug 4, 2022

@urkle that prop makes sense only with autocomplete.
You should use disabled prop to avoid adding new elements without autocomplete, no?

@jtommy jtommy added the question Further information is requested label Aug 4, 2022
@urkle
Copy link
Contributor Author

urkle commented Aug 5, 2022

@jtommy it just seems an odd stock configuration of the component to allow it to add new elements when you have autocomplete disabled. As you have to explicitly disable the input which then creates other issues.

My ideal setup for the usage I have for this component right now is to have it behave like this

  1. no auto complete
  2. no creating new entries
  3. clicking NOT on a pill opens the dropdown selector showing "unselected" entries
    • currently the dropdown shows ALL entries
    • Currently this requires the autocomplete option to even work
  4. selecting an entry from the dropwon adds that pill and then closes the dropdown
    • if I have the dropdown open on focus it ALWAYS stays open making a difficult UX for the user to get it to be dismissed.

@jtommy
Copy link
Member

jtommy commented Aug 6, 2022

I'm sorry but I don't understand the 1 and 2 point.
No autocomplete and no new entries.. who add the entry? And what entries? Free text i imagine

@astagi
Copy link
Member

astagi commented Jan 21, 2023

@urkle any update there? can you provide a working example to show your problem?

@astagi astagi added the vue 3 label Jan 21, 2023
@mlmoravek mlmoravek removed the vue 3 label Feb 1, 2024
@mlmoravek mlmoravek changed the title Inputitems allows new entry when autocomplete is false Taginput: allows new entry when autocomplete is false Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants