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

[Bootstrap 4] Adding 'd-flex' class to HasError component #25

Closed
stevebauman opened this issue Mar 2, 2018 · 2 comments
Closed

[Bootstrap 4] Adding 'd-flex' class to HasError component #25

stevebauman opened this issue Mar 2, 2018 · 2 comments

Comments

@stevebauman
Copy link

For bootstrap 4 there is an issue that the is-invalid error message won't be displayed unless it's a child element of the input.

This means for input-group's and form-group's, the error message isn't displayed since it's default is display:none:

twbs/bootstrap#23454

So far the only clean solution to this has been forgetting the input box itself and apply the d-flex class onto the error message div so at least that is displayed.

What are your thoughts on applying this to the HasError component?

@cretueusebiu
Copy link
Owner

cretueusebiu commented Mar 2, 2018

I usually just add d-block where I encounter this:

<has-error class="d-block"/>

Or just add some global css:

.invalid-feedback {
  display: block;
}

You can always just create your own HasError.vue and implement it in another way.
I do this when I'm working with other frameworks than Bootstrap.

@stevebauman
Copy link
Author

Thanks for the quick response!

Yea sounds good, I'll just copy the HasError.vue component and apply the d-block class for now, until Bootstrap fixes it.

Appreciate your time.

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

No branches or pull requests

2 participants