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

When multiple classes are assigned to the classNames.input, an error occurs #738

Closed
3 tasks done
NullVoxPopuli opened this issue Feb 10, 2021 · 4 comments 路 May be fixed by #846
Closed
3 tasks done

When multiple classes are assigned to the classNames.input, an error occurs #738

NullVoxPopuli opened this issue Feb 10, 2021 · 4 comments 路 May be fixed by #846

Comments

@NullVoxPopuli
Copy link

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

https://jsbin.com/kakagisovu/edit?html,js,output

Explanation

  • What is the expected behavior?

No error

  • What is happening instead?

Error

  • What error message are you getting?
Uncaught TypeError: this.DOM.input is null
    binding https://unpkg.com/@yaireo/tagify:1
    f https://unpkg.com/@yaireo/tagify:1
    <anonymous> jekuqap.js:38
@yairEO
Copy link
Owner

yairEO commented Feb 11, 2021

why are you adding classes to the input element specifically and not to the wrapper itself?

You can add the classes afterwards:

tagify.DOM.input.classList.add(...)

Currently you cannot add multiple class names to the input field in the way you are trying to, since I never imagined someone will change the input's class, and if so, override it with multiple class names.. it's not easy to solve this now that the code is mature

@NullVoxPopuli
Copy link
Author

why are you adding classes to the input element specifically and not to the wrapper itself?

cause that's how use use Tailwind. No CSS. 馃し

@NullVoxPopuli
Copy link
Author

You can add the classes afterwards:

how would that work with dropdownItem, dropdownItemActive, and tag?, since those things are dynamic?

@yairEO
Copy link
Owner

yairEO commented Feb 13, 2021

Why can't you just write CSS?

Anyway, you should not override Tagify's default class names, but simply write your own CSS which overrides the default Tagify's CSS file

You cannot add multiple class names currently, it is not designed to support that, and it is also not a limiting factor since you can write CSS but actively choose not to. It's considerable work for me to make adjustments and it's not worth it for me, sorry (I work alone on Tagify, for free)

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

Successfully merging a pull request may close this issue.

2 participants