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

FormGroup combined with InputGroup doesn't render properly due to mis-placed class name 'mb-3' #2783

Open
bpietsch opened this issue Dec 8, 2023 · 1 comment

Comments

@bpietsch
Copy link

bpietsch commented Dec 8, 2023

  • components: InputGroup FormGroup
  • reactstrap version 9.2.0
  • import method csj
  • react version 18.2.0
  • bootstrap version 5.3.1

What is happening?

When combining InputGroup and FormGroup, the "mb-3" css class should be placed on the InputGroup element, not the FormGroup element

Pure bootstrap:

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js"></script>
Code 1

if I use the following reacstrap code

<InputGroup className="mb-3">
  <FormGroup floating>
    <Input
      id="foo
    <Label for="foo">
      Foo
    </Label>
  </FormGroup>
  <span className="input-group-text"><i className="fas fa-times" /></span>
</InputGroup>

"mb-3 is added to the form group div, resulting in the add-on being taller than the input it is attached to.

Error message in console

None
Screenshot 2023-12-07 at 6 32 14 PM
Screenshot 2023-12-07 at 6 32 14 PM

@bpietsch
Copy link
Author

bpietsch commented Dec 8, 2023

Uploaded the wrong screenshot for the correct case...

Screenshot 2023-12-07 at 6 34 16 PM

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

1 participant