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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot disable dropdown #978

Closed
3 tasks done
jamesbebbington opened this issue Feb 4, 2022 · 2 comments
Closed
3 tasks done

Cannot disable dropdown #978

jamesbebbington opened this issue Feb 4, 2022 · 2 comments
Labels

Comments

@jamesbebbington
Copy link

jamesbebbington commented Feb 4, 2022

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

馃挜 Demo Page

Given the following config:

<input name='tags' placeholder='write some tags' value='css, html'>    
var inputElm = document.querySelector('input[name=tags]');


// initialize Tagify on the above input node reference
var tagify = new Tagify(inputElm, {
  
    whitelist: ['c++', 'css', 'html', 'java', 'javascript'],
    autoComplete: {
        enabled: true,
        rightKey: true
    },
    dropdown: {
        enabled: false // Dropdown still displayed
    }
})

https://codepen.io/typer78/pen/XWzjZvY
Screenshot 2022-02-04 at 16 53 50

Explanation

  • What is the expected behavior?

I would like to configure Tagify to only show inline autocomplete suggestions but never the dropdown list. The README states that setting:

dropdown.enabled to false will not render a suggestions list.

I would expect the component to provide an inline autocomplete suggestion when the entered text matches an element from the given whitelist and no dropdown to be displayed.

  • What is happening instead?
    The dropdown is displayed even though dropdown.enabled is set to false.

  • What error message are you getting?
    No error message.

@yairEO yairEO added the Bug label Feb 5, 2022
@yairEO yairEO closed this as completed in 45b2a8a Feb 6, 2022
@jamesbebbington
Copy link
Author

Brilliant, many thanks for the speedy fix! Great library by the way.

@dumbasPL
Copy link
Contributor

NOTE: this change breaks the previously working but technically wrong

enabled: true

found out the hard way.

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

No branches or pull requests

3 participants