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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Input): hide wrapper when type is hidden #1797

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/runtime/components/forms/Input.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="ui.wrapper">
<div :class="(type === 'hidden') ? 'hidden' : ui.wrapper">
eduardo-faith marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ui.wrapper contains the relative class for absolute icons underneath, did you try with icons?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I did not style the input with icons.
As I mentioned in the description, when the UInput is part of (for example) a div.grid.gap-4 the div.relative (ui.wrapper) of UInput will cause a gap between other elements - that's the root of my PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But semantically you're absolutely right, there is not much sense of using a UI library for a hidden input-field - it just felt right for me to "fix" this πŸ˜…

<input
:id="inputId"
ref="input"
Expand Down
Loading