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
input: JSX elements cannot have multiple attributes with the same name. #1821
Comments
Unfortunately, this issue seems to persist - and is also still happening on 0.40.10. |
last version that does not give this error in my project is |
Seems to be still problematic in |
Same problem in my project |
This also happens when using |
I edited my entry post to show a possible solution |
We have added new |
@johnsoncodehk your fix seems to be vue 2 related. I am not sure how this solves the issue. I just updated volar and the configuration setting doesnt seem to exist. I wouldnt know what to put there anyway to solve the issue. Can you elaborate? |
This is not VSCode setting, it's from |
@johnsoncodehk thx, and how do I use it? I cannot find any documnentation and intellisense is not helping me |
in my case (bootstrap-vue radio button), the following worked.
for your case - i think the following should work
|
@Fuzzyma look to your code I guess
|
@johnsoncodehk the error goes away if i just write this:
But i assume thats because I overwrite the defaults.
The above does not work. How can I add multtiple optiosn for the "ignore" case? |
You can't, this is design mistake of |
We could simply allow passing an array:
|
@Fuzzyma please try v1.0.7 |
It works like a charm @johnsoncodehk . Thank you very much! I also found out that you can use |
Good to know. :)
If anyone wants to add documentation for it PR is much appreciated. (I plan to do but not these days) |
I might be wrong on this one. When I opened vs-code later, it showed as wrong again so maybe my types just didnt update properly :D |
@Fuzzyma you can use |
Wow - I INSTANTLY found the issue when using this. In the virtual file, standalone attributes have the value |
For anyone using BootstrapVue, the following reference is provided. In
|
I cannot get this to work with Here's my minimal reproduction: Any ideas? |
Found my problem, this setting is sensitive to component name casing, i needet to add |
The recent update made my build crash. The Error is:
It's an input whose type is either "radio" or "checkbox" with a v-model and a value. Obviously, those 2 are allowed for these types.
Only for other inputs, it would be a duplication
Volar seems to handle this case as a regular input even tho the type of type (haha) is radio or checkbox.
Possible Solution
If you know that your input is a checkbox or radiobox, dont use v-model.
Instead use
:checked="foo"
and@change="foo = $event.target.checked"
That will solve the duplication because volar seems to handle v-model as :value instead of :checked.
The text was updated successfully, but these errors were encountered: