ui icon indicating copy to clipboard operation
ui copied to clipboard

fix(Input): Hide wrapper when type eq hidden

Open eduardo-faith opened this issue 1 year ago โ€ข 2 comments

๐Ÿ”— 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 ๐Ÿ™ˆ

eduardo-faith avatar May 16 '24 12:05 eduardo-faith

@Tarabass Thanks! Never seen that style before, sorry. Shall I change the code to class object?

eduardo-faith avatar May 16 '24 20:05 eduardo-faith

Maybe one of the maintainers can answer that. For me it doesn't matter that much :)

Tarabass avatar May 16 '24 20:05 Tarabass

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 avatar Jun 03 '24 12:06 benjamincanac

@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! ๐Ÿค“

eduardo-faith avatar Jun 05 '24 04:06 eduardo-faith