fix(Input): Hide wrapper when type eq hidden
๐ Linked issue
Resolves #1784
โ Type of change
- [ ] ๐ Documentation (updates to the documentation or readme)
- [x] ๐ Bug fix (a non-breaking change that fixes an issue)
- [ ] ๐ Enhancement (improving an existing functionality)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
In some layout, i. e. a grid with gap-4, the wrapper is still existent. Therefore there are two gaps between the previous and following visible elements.
Now the wrapping div has class 'hidden' when type="hidden". Otherwise it has the classes from ui.wrapper.
๐ Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Sorry, I couldn't resist to try the PR. ๐ค Hope everything is according to the conventions. Don't hesitate to change anything or close the PR if I made a mistake ๐
@Tarabass Thanks! Never seen that style before, sorry. Shall I change the code to class object?
Maybe one of the maintainers can answer that. For me it doesn't matter that much :)
I'd like to ask, why use a UInput with a hidden type? It's main goal is for styling and icons, is there a reason to use it instead of a classic <input type="hidden">? ๐ค
@benjamincanac In my case the value of the field has to be sent to the backend via the form. But depending on a prior input of the user the field should be visible and editable.
I was using :type="..." and thought it could be mentioned.
You can close the PR if the change is not clean code! ๐ค